Large packs seem to kill the html page
mezz opened this issue · 13 comments
I ran TextureDump on the HermitPack, and the html page is not responsive to hovering except the first (ridiculously giant) 512x512 texture.
I've seen this on ForgeCraft, it seemed to be caused by a botania texture that was 60x60 that broke the grid I made for fast lookups.
The slowness seems to be with highlighting things, not the page loading. I can hover... wait... wait... and then it shows it as hovered.
Sorry, I missed that it was the highlighting that was the issue, I just pushed a couple of changes that reduce the amount of processing that needs to be done.
Another thing to perhaps test would be changing these values:
https://github.com/mezz/TextureDump/blob/master/src/main/resources/assets/texturedump/page.html#L18
setting it to say, 64 or 32 increases the number of cells in the grid and reduces the number of sprites that could be occupying that cell (so, less to iterate over at the expense of more memory)
With your changes it's working better than before but still gets stuck some places. I'll play around with that value and see what happens.
The issue seems to occur when highlighting a texture that is smaller than the ones it's next to. When I set the cellsize to 32x32 it works much better but still has occasional pauses.
This should be fixed by 41c17b6
I'm not 100% sure, but I think I got this to load faster by preallocating the arrays. I don't think I'm going to be able to get it any faster unless I pre-process the data Java side.
I can't seem to find a way to get JavaScript to do parallel processing while writing back to shared memory.
Failing that, I might need to find a way to background the processing and stick a loading bar on it.