Skip to content

Optimization of genBlockColumn and WeightsAt - #139

Merged
tehtelev merged 1 commit into
StratumServer:indevfrom
tehtelev:indev
Jul 11, 2026
Merged

Optimization of genBlockColumn and WeightsAt#139
tehtelev merged 1 commit into
StratumServer:indevfrom
tehtelev:indev

Conversation

@tehtelev

@tehtelev tehtelev commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Summary

Changes for genBlockColumn:

  • Buffer for float[] data used.

Changes for WeightsAt:

  • Loop replaced with immediate clearing of the output array, variables reused.

Type

  • Bug fix
  • Performance
  • New feature
  • Refactor or cleanup
  • Docs or build

Checklist

  • .\scripts\extract-patches.ps1 ran clean.
  • dotnet build VintageStory.slnx -c Release is green.
  • Every vanilla edit has a // Stratum marker.
  • No vanilla source committed.
  • Tested on a real server start, not just compilation.

Performance numbers

Tested on the generation of 10200 chunk columns:

  • genBlockColumn method execution time: reduced from 16152 ms to 14678 ms;
  • genBlockColumn GC memory allocations: reduced from 639 MB to 90 MB;
  • WeightsAt method execution time: reduced from 600 ms to 10 ms;
BEFORE spoiler rockstrata before trace rockstrata before mem weightsat before trace 2026-07-11_15-59-23 2026-07-11_16-15-07
AFTER spoiler rockstrata after trace rockstrata after mem weightsat after trace stratum rocks 1 stratum rocks 2

@tehtelev
tehtelev marked this pull request as ready for review July 11, 2026 14:08
@tehtelev
tehtelev merged commit 5d2060b into StratumServer:indev Jul 11, 2026
4 of 6 checks passed
@tehtelev

Copy link
Copy Markdown
Contributor Author

Also sent to developers PR

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