Community listing page, reviews may not be monitored by the author.
Tom's Simple Storage performance optimization
No reviews yet
Fixed performance issues with Tom's Simple Storage
Community voices
Reviews
No reviews yet. Be the first to review this project!
Get it on
Available Platforms
About
Project Details
For authors
Embed Badge
If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.
Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.
Identifiers
Platform IDs
Resources
External Links
About
Description
Tom's Simple Storage performance optimization
Minecraft 1.20.1 · Forge · requires Tom's Simple Storage 1.7.1+
This mod adds no content of its own. It is two hooks into Tom's Simple Storage's own classes, and it does nothing without it. Both changes remove repeated work and leave every result identical.
Opening a storage terminal rescans the whole network every server tick. The menu's broadcastChanges() runs once per tick while a screen is open, and getStacks() sets the "items changed" flag every time it is called. updateServer() then clears the item index and re-reads every slot of every connected container. The flag is set by a reader, so "rescan when dirty" becomes "rescan every tick while the screen is open". It is now set once every 10 ticks by default (configurable), which makes the list on screen up to half a second stale — a display refresh, not a transaction, so nothing can be duplicated or lost. Loading and linking an inventory are untouched and still rescan immediately.
The flat slot number is found with a linear scan. Every linked container shares one flat numbering, but only their sizes are kept, so getStackInSlot(slot) subtracts those sizes one at a time — O(containers) per lookup. The terminal walks every slot to rebuild its list, which makes one rebuild O(containers²): roughly 11,000 steps with 20 containers, 270,000 with 100. A prefix-sum array and a binary search now locate the container instead — the same method Forge's own CombinedInvWrapper uses — taking a rebuild to O(containers × log containers). The container and the local slot handed to it are identical to what the scan produced, so the item list is unchanged. Networks of 8 containers or fewer keep the original code path.
Config — config/tomsstorageperformanceoptimization-common.toml: enabled, throttleRescan, rescanIntervalTicks, fastSlotLookup. Setting enabled = false restores stock behaviour completely; each switch also works on its own.
Screenshots
Gallery
Versions
Files
Relations
Project Relations
More like this
Similar Mods
Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.
On ModDex
Community snapshot
By the numbers
Statistics
Get it on
Available Platforms
On ModDex
Community snapshot
By the numbers
Statistics
Resources