-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Compiling code containing very long arrays takes, a strangely long amount of time. #6484
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
Comments
Do you have some example code that shows this problem in action? How long is 'very long'? |
@Thiez Sure, I'd be happy to give you an example of the code. I just didn't attach it because it is very long, and boring, and an alternative is easily auto-generated. Here's a link to a gist https://gist.github.com/sstewartgallus/5587348 |
It seems the compiler is making LLVM generate an enormous number of moves, which LLVM then tries to optimize (without much success). I think this is related to #3025. As a workaround you might try to put the contents of the SpriteList in a top-level static, then generate the 'real' SpriteList from the static structure with many calls to |
How long was it taking? Not sure the best way to deal with this. I seem to recall C compilers sometimes being unhappy with huge arrays as well... |
As far as I know, these issues have been fixed and we generate loops whenever possible. There would need to be a reproducible test case comparing |
In order to compile resources into my application statically, I automatically generate very long arrays. These take an extremely long amount of time to compile.
The text was updated successfully, but these errors were encountered: