Skip to content

Optimize TreeGen for memory and performance - #50

Open
tehtelev wants to merge 1 commit into
anegostudios:masterfrom
tehtelev:patch-10
Open

Optimize TreeGen for memory and performance#50
tehtelev wants to merge 1 commit into
anegostudios:masterfrom
tehtelev:patch-10

Conversation

@tehtelev

@tehtelev tehtelev commented Jul 11, 2026

Copy link
Copy Markdown

Summary

Added manual position pool and variable for vine positions when generating trees.
This significantly reduces GC pressure, since the code also works recursively.

Also this PR is related to this

Performance numbers

Tested on the generation of 10200 chunk columns:

  • TreeGen.growBranch method execution time: reduced from 3549 ms to 2607 ms;
  • TreeGen.growBranch GC memory allocations: reduced from 1.14 Gb MB to 211 MB.

Before
growbranch before trace
growbranch before mem
2026-07-11_12-14-08
2026-07-11_12-14-41

After
growbranch after trace
growbranch after mem
stratum дерево 1
stratum дерево 2

@tehtelev
tehtelev marked this pull request as ready for review July 11, 2026 09:32
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.

1 participant