-
Notifications
You must be signed in to change notification settings - Fork 140
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
Investigate why build scripts are slower than presets #649
Comments
@allisonvacanti I'd be curious to hear your thoughts on this. |
https://discord.com/channels/1019361803752456192/1161051667945508884/1169068895500505150 ^ from the conversation on discord The way I'm running the tests for cccl has a slow feedback loop. I'm wondering if it can be optimized somehow. (btw, I haven't had time to look into the new presets yet. I still just run from the command line) Let's say I'll make a small change in one test suite. PARALLEL_LEVEL=24 ./ci/test_cub.sh -cxx clang++-16 -std 17 -arch 86 running this for example will take ~190 seconds before it begins the build process. Any way to speed up this feedback loop? Really the CI scripts are best used for checking that everything will pass in CI before submitting the changes to GitHub. Ideally you might test a few combinations locally and hence why they would go through all the setup and teardown that takes such a long time. 190 seconds for configuration is... Pretty massive though. When I am done with work I can help provide more "data" to help diagnose. |
That definitely doesn't sound right. There must be something else going on here. |
Sorry now that I think about it, it isn't a proper description of what happened. For example, I ran the script with Also perhaps my network was slower than usual at the time, which would be unrelated to the script itself. Not sure if it downloads anything during the script. When I have time later today I'll do some proper benchmarking and report back. I am doing too much context switching right now 😅 |
Is it taking 190s to see the error, or 190s for the script to finish after the error appears? It may be that some of the compilations continue after the error is hit, and the script stays live until all of these child processes finish. Meanwhile, building the preset through an IDE or something would likely flag the error as soon as it appears, even if there's still compilation ongoing in the background. |
Similar issue here, when using the test preset it is instantaneous starting lit, when only building it takes ages |
The scripts force both the configure and build steps to run no matter what. That's likely where the overhead is coming from. A do-nothing build should be practically free, but rerunning CMake can be somewhat expensive, especially on windows. |
Its also like that on linux and I dont understand why configure + lit with NoopExecutor is so much slower than configure + lit |
It might be the lit parallelism settings. |
I haven't done a deep enough dive on what the scripts are doing internally so I can't comment on the difference, but I've noticed empirically that it is much slower than just directly using the preset.
The feedback loop was really slow for me personally. If I made a small syntactical error in writing my code, it would take 2-3 minutes from running the build scripts before I got to see the error. That compounds really hard, where as running the preset build directly the feedback is nearly instantaneous.
Originally posted by @ZelboK in #647 (comment)
The text was updated successfully, but these errors were encountered: