mega12345mega / NBT-Editor

Edit items, blocks, and entities in-game.
MIT License
49 stars 16 forks source link

Game stops responding when working with huge amounts of nbt #59

Open lNethunter opened 1 year ago

lNethunter commented 1 year ago

Please fix it if possible.

mega12345mega commented 1 year ago

I don't believe it is possible (or at least feasible) to greatly improve the performance, but that depends on what exactly is causing the issue. What action(s) are problematic? I could see editing being very slow, but saving being reasonable. Is it when you are working with a large string (or text field) or just a large item in general? Do non-gui based item factories work ok? (It could be rendering the nbt rather than editing the nbt.) Obviously this would never end up super smooth; at some point it's a hardware limitation. (When you say "huge", what is the file size of the result from /nbt export file when holding the item?)

Also as a side note, Minecraft is unable to save large nbt strings (which you can especially notice with imported high-res images), so make sure you don't end up corrupting that part of an item on accident.

HyperSoop commented 1 year ago

As far as I know, NBT Editor operates without multithreading and probably so on the render thread. Its processing should probably be moved off-thread and have a progress bar for if it takes noticably long.