optimization #2
Labels
enhancement
New feature or request
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There are actually plenty of good box packing algorithms out there, but I made my own version without much regard for optimization since I had planned on using it for a spritesheet generator anyway. Surprisingly, I've found that arranging a mere six boxes creates upwards of 1000 permutations on average and already takes a few seconds to load. Seven boxes made Chromium lock up entirely in my own experience and required a system restart.
I haven't done benchmarks yet (which is another issue entirely), but I'm assuming there's a large performance bottleneck stemming from recursion and the subsequent mass object creation that's going on.
Basically, I'd love to create an imperative version of this algorithm or at least find some loopholes to keep memory usage to a bare minimum.
The text was updated successfully, but these errors were encountered: