Keep built maps after load & dedupe updateLayout on first open#203
Keep built maps after load & dedupe updateLayout on first open#203Rsslone wants to merge 2 commits into
Conversation
Gated behind ULM mode, I guess.
|
Fixes #202 |
jchung01
left a comment
There was a problem hiding this comment.
StackHelper#uidCache is cleared after startup because it takes up a lot of memory. I verified this in the MeatballCraft modpack - with this PR, uidCache retains 473 MB. I think your 1st commit should be reverted, this seems unacceptable regardless of ultra-low memory mode.
Having no UID cache at runtime should be fine in most cases, it was only having performance issues with the anvil category because all possible itemstacks were being condensed into a single anvil entry per unique enchantment, so the LHS input and output ingredient lists were extremely large, causing the slowdown while querying the UID. As I mentioned in the issue, that only seems to be happening with the published version of 4.31.1 (for unknown reasons), but not one built off the current main branch.
| open(); | ||
| } | ||
| } finally { | ||
| openingGui = false; |
| open(); | ||
| } | ||
| } finally { | ||
| openingGui = false; |
As title states, not sure why the uid cache is reset after startup, maybe there is a good reason? idk.
Keep the maps that is generated on startup instead of clearing them, unless ultra low memory mode is enabled.
A simple bool to dedupe the updateLayout call on first open.
Fixes #202