I built a custom storage engine for Minecraft that achieves 486ns chunk loads

  • Thread starter Thread starter /u/Chrimbie
  • Start date Start date
U

/u/Chrimbie

Guest
I got curious if I could make chunk loading faster, so I built a custom storage system called REFLEX (append-only key-value store) and modded Minecraft to use it instead of region files.

How it works:

  • Converted my world from .mca files → single .rflx file (391 MB, 12,679 chunks)
  • Built a Fabric mod that intercepts chunk loading with mixins
  • Server pre-loads the entire world into RAM on startup (410 MB)
  • All chunk queries hit a HashMap instead of disk

Performance benchmarks:

  • Raw cache lookup: 486 nanoseconds
  • Full chunk pipeline: 87 microseconds
  • Throughput: 11,496 chunks/sec
  • Zero disk I/O during gameplay

For comparison, even NVMe SSDs are ~50-100 μs per read. This is ~200x faster.

Built the whole thing in one day as a proof of concept. The architecture could theoretically scale to multi-GB worlds with the same performance since it's just memory-mapped file access.

submitted by /u/Chrimbie
[link] [comments]

Continue reading...
 
Back
Top