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
Local optimizations take forever to complete on 24-player maps with 2 forces #700
Comments
What does it look like normally?
Just a big amount of lines shouldn't make local opts take exponentially longer - so probably another issue at hand here.
Seems kind of overkill - fixing this behavior should be sufficient. |
Idk, did you highly exaggerate here? e: @Samuelmoriarty The minimal "workaround" for this seems to simply not inline the |
not sure if the optimization is still correct with this change ...
The problem is that I created a branch with a change that should reduce the running time of the |
has been fixed by #1024 |
Steps to reproduce:
Make a 24-player map like this:
Make 2 forces like this:
Saving this map in WorldEdit produces this monstrosity of a function:
https://pastebin.com/JED2J7V3
If inlining is turned on, this gets turned into an even bigger monstrosity:
https://pastebin.com/r3kURDAY
That is 4 thousand lines of JASS code.
If you now turn on local optimizations, it takes forever for them to actually run, compared to 2-4 seconds on normal 12-player maps (or a 24-player map with no forces). If you remove these 2 forces, everything goes back to normal.
I don't know how this bug should be addressed, but it can be a major pain for maps with 24 players where 2 or more forces are involved. I like compiling with all optimizations enabled because even on my big project (15k lines of optimized jass emitted) it doesn't take too long to finish, with 90% of stdlib imported. But this function, it just can't regurgitate.
One of the safer options would be to just disable optimizations on the
config
function directly, since it only runs once per map and hardly needs optimization at all. I don't think anyone would suffer from it.The text was updated successfully, but these errors were encountered: