-
Notifications
You must be signed in to change notification settings - Fork 7
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
BloopInstall is unreasonably slow for large builds #142
Comments
Hi @SheliakLyr 10 mins seems far too long. I've run an import for 200 modules in 20ish seconds. Intellij uses a different method than Bloop to extract the project data. Gradle runs theirs in parallel by default. Could you try adding the following to your
If it does not - could you create a sample repo of your build and I'll have a look at it. |
Hi, Unfortunatelly, I am already using parallel mode (however, with only 2 workers):
About sample repo.. I can try to reproduce this issue on some generated, large projects. My build currently has 1041 modules. Each module has multiple source roots, which might make the issue worse. I am also willing to personally contribute some changes and test them. Hotspots from CPU profiling: |
I created a simple gradle build: https://github.com/SheliakLyr/large_gradle_build_example
I have also prepared experimental fixes that offer very big improvements. First one: https://github.com/SheliakLyr/gradle-bloop/tree/performance makes the bloopInstall finish in ~3 minutes. Changes are very simple, basically I compute a list of projects only once per each task. Second one: https://github.com/SheliakLyr/gradle-bloop/tree/performanceHacks speeds up the buildTask to 1m30s by sharing the list of projects between all tasks. I suspect this might be unsafe and/or broken. |
Describe the bug
For large gradle builds (hundreds of modules), bloop install takes a lot of time (at least more than 10 minutes for my case, I gave up after that), which makes it unusable when compared to the alternatives (IDEA import takes ~1 minute).
Quick look at the profiler is enough to locate to core issue. For each project, all other projects are fetched in order to match outputs to inputs between projects. The following code is executed for all projects, which does not scale:
Expected behavior
BloopInstall should be reasonable fast for large repositories. At least as good as import to the Intellij IDEA.
Operating system
Linux
Version of Gradle
8.8
Version of gradle-bloop
2.13/1.6.2
Version of Bloop
unreleated
The text was updated successfully, but these errors were encountered: