Skip to content

Fix high memory usage during world loading#57

Merged
NotStirred merged 6 commits into1.20.4from
1.20.4_chunkLoading_optimizations
May 31, 2025
Merged

Fix high memory usage during world loading#57
NotStirred merged 6 commits into1.20.4from
1.20.4_chunkLoading_optimizations

Conversation

@CursedFlames
Copy link
Member

No description provided.

@CursedFlames
Copy link
Member Author

Subscriber list for getChunkRangeFuture is a start, however there's still a huge number of CompletableFutures involved in ChunkHolder.chunkToSave which should also be optimized out

@CursedFlames CursedFlames force-pushed the 1.20.4_chunkLoading_optimizations branch 2 times, most recently from 8227754 to 5f85b3b Compare May 27, 2025 02:20
@CursedFlames CursedFlames marked this pull request as ready for review May 27, 2025 22:34
@CursedFlames
Copy link
Member Author

As discussed, further optimizations can wait until after we've bumped to the latest Minecraft version

@CursedFlames CursedFlames marked this pull request as draft May 27, 2025 22:47
@CursedFlames
Copy link
Member Author

Nvm not ready to merge, still need to write unit tests for CloCollectorFuture

@CursedFlames CursedFlames marked this pull request as ready for review May 27, 2025 23:56
@CursedFlames CursedFlames requested a review from NotStirred May 28, 2025 04:51
Copy link
Member

@NotStirred NotStirred left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed, many of the ChunkStatus methods don't work for both chunks+cubes, but we're fine with that until P2 and the vanilla chunkloading rewrite.

…than depending on a large list of CompletableFutures.

This significantly reduces memory usage; this optimization was originally added to CC2 in 2020 by Cyclonit.
Also add a misssing dasm redirect in MixinChunkMap.
Currently still fails due to excessive memory usage.
@CursedFlames CursedFlames force-pushed the 1.20.4_chunkLoading_optimizations branch from c4c8131 to 41035f7 Compare May 31, 2025 00:07
@NotStirred NotStirred enabled auto-merge (rebase) May 31, 2025 00:09
@NotStirred NotStirred merged commit e9a3a08 into 1.20.4 May 31, 2025
7 of 8 checks passed
@NotStirred NotStirred deleted the 1.20.4_chunkLoading_optimizations branch May 31, 2025 00:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants