8000 optimization · Issue #2 · semibran/pack · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

optimization #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
semibran opened this issue Jan 29, 2018 · 0 comments
Open

optimization #2

semibran opened this issue Jan 29, 2018 · 0 comments
Labels
enhancement New feature or request

Comments

@semibran
Copy link
Owner

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.

@semibran semibran added the enhancement New feature or request label Jan 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant
0