1.20.1 - ``blockui-1.20.1-1.0.115-BETA.jar`` has a bug which cases ``mass lag in larger packs`` when browsing ``recipes of min stock`` SMP
P3rf3ctXZer0 opened this issue ยท 9 comments
Is there an existing issue for this?
- I have searched the existing issues.
Are you using the latest Structurize Version?
- I am running the latest alpha version of Structurize for my Minecraft version.
I am also running the latest versions of other mods that are part of my problem.
Did you check on the Wiki? or ask on Discord?
Minecraft Version
1.20
Structurize Version
structurize-1.20.1-1.0.659-BETA.jar
MineColonies Version (if related bug)
minecolonies-1.20.1-1.1.303-BETA.jar
Related Mods and their Versions
blockui-1.20.1-1.0.115-BETA.jar
Requires a large modpack such as ATM9 or Fiction Friction Pixelated Monsters. Otherwise the spike is not very big.
Current Behavior
When browsing to set stock recipes etc at a station there is a massive client side lag spike that spans between 55-65 seconds. (Note the server keeps running as normal thus my comment directly calling out clientside.) After the spike ends all the villagers talk at once. ... In testing it does not affect anyone else on server just the person messing in UI.
Expected Behavior
No time freeze lag spike.
Reproduction Steps
Update Block UI to required version in large modpack. Click on a any station stock min wait forever.
Logs
https://gist.github.com/P3rf3ctXZer0/7f7ddc4df77a7e7d3ee5e9c33137be8b and https://gist.github.com/P3rf3ctXZer0/dc96c354006fd1d2ebde1890315e34fa
Anything else?
The bug does not exist in blockui-1.20.1-0.0.103-ALPHA.jar
Footer
Viewers
- Add a thumbs-up to the bug report if you are also affected. This helps the bug report become more visible to the team and doesn't clutter the comments.
- Add a comment if you have any insights or background information that isn't already part of the conversation.
What about modifying the system to use pages so you limit spawn of things in beginning to 40 items and then all other things are indexed in 40 slot pages like a book. That way regardless to ui you could still allow dynamic ui window resizing? If people need to fast lookup they can use search function.
In another theory why not allow item lookup through JEI when present? That way they can change things and you can offload the heavy lifting to JEI/REI/EMI
@Nightenom we got several of those reports with the newer blockui versions
This could potentially be due to a change I made to scrolling lists, where all items are instantiated at the start in order to allow for dynamic element size.
However I'm pretty sure the min stock list is supposed to be empty at the start.
This could potentially be due to a change I made to scrolling lists, where all items are instantiated at the start in order to allow for dynamic element size.
However I'm pretty sure the min stock list is supposed to be empty at the start.
It is empty. Clicking add triggers the bug or did you mean the search list ... if you mean the search list no it seems to list things numerical to alphabetical in ingredients list. Example my pack as 44 ammo so that is always on top.
We probably want to revert it first. And then we will have time to slowly think how we can do this more dynamically on a "need to know basis"
Yeah then this is probably due to the fact that min stock renders every single possible item in the game.
So on open it's stuck making potentially thousands of items before it can show.
So my theory of it is re-caching everything on open is not far off? Who knows maybe I will be a coder yet :)
It's not necessarily a "cache", a scrolling list used to only initialize the items in the view as soon as they were "in view".
That was removed in favor for allowing dynamic element sizing, which would void that logic.
So I guess we're going to have revert that.
List virtualization is tricky, especially if you want to be able to randomly scroll to the end of the list without loading anything in the middle. It's much much simplified if all items are fixed size.
Possibly related: I've noticed (prior to these changes) that when using the Replace list in the scan tool, quickly scrolling all the way to the end, then clicking on a block select button, results in selecting the wrong block. Clicking on the "same" button selects a new wrong block each time, until it eventually "catches up" and selects the correct block.