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
Big negative impact on compilation time #25
Comments
I can only confirm what @APesate said. Same problem for me. |
This is a known issue with the compiler taking too long to resolve complex expressions. Unfortunately I don't have a solution for this until this is improved in the compiler. |
@indragiek I tried this other option, https://github.com/Raizlabs/Anchorage, sorry about that. Anyway, the same code above goes from 56690.86ms to 580.65ms and the are using also complex expression. Maybe would be nice if you take a look and see what could be wrong. I found a case were the compilation time is increased a lot: |
Why not make the priority of the '+' operator between 'view.top' and '5.0' a little bit lower? This will let '5.0 + 10.0 + 40.0' be calculated first into 55.0 and turn 3 constraint-relative operations into 1. |
After running a profiling script to check the compilation times of the project (because it began to be really slow) I noticed that the methods where I set up the constraints with this library are the ones that take the longest to compile and it's making the project to take between 4 - 5 min to run. The project is really small so it shouldn't be the case.
This is the method that takes the longest to compile. 56690.86ms
By changing the constraints configuration to use NSLayoutConstraint directly it goes down to 10.56ms As you can see is quite difference.
Any ideas on what could be the problem or how to fix this? I would really like to continue using this library because it makes so much easier and faster the constraints setup, but the impact it has on the build time is just too big and it will only get worse as the project gets bigger.
The text was updated successfully, but these errors were encountered: