-
Notifications
You must be signed in to change notification settings - Fork 17
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
Speeding up the build time #23
Comments
I am giving lecture with students on various systems and they all experience the same issue It is actually easy to reproduce: # Cloning a minimal example
git clone https://github.com/Gregwar/mbed_debug.git
cd mbed_debug
pio run # Doing an initial build
time pio run # The time it takes to do pio run doing nothing on my computer: 17.8s
# The same issue apply if I just do minor change in the app code |
As far as I understood in my investigations in scons, almost 100% of the CPU time is spent scanning for the mbed framework headers and source files changes, while we know for sure they didn't change because we only have to build mbed once (if I change some files in src/ it should not impact it) It could be a solution based on an explicit user flag like |
Could provide an output of 2nd attempt to run
It took me 8 secs. But, my machine is very fast. If you don't have SSD, then 17 secs is OK to check if 650Mb of files are modified. |
Your PC is fast, mine is slower, and my students are even slower (it takes minutes to wait on some of them, making pio+mbed almost not practicable) (With my hack, see blog post above, it takes only 2s instead of 17s) |
Have you tried https://docs.platformio.org/en/latest/projectconf/section_platformio.html#build-cache-dir
|
If I understand well, this cache directory allows you to share object files across projects to avoid re-building them |
Thanks, we agree with you and will investigate how to disable this modification checking for frameworks. |
@Gregwar could you help to investigate this issue? There is Decider in SCons and I tried to use it but don't see significant improvement.
You can use it with PRE script https://docs.platformio.org/en/latest/projectconf/advanced_scripting.html |
My hunch would be:
But I have little knowledge of scons and I am not sure how to achieve that |
Hello @Gregwar, Another solution is to apply a A community script already exists, you can have detailed instruction here to how to set up the mbedignore script. If students need to debug too, you can add |
I'm getting the same issue. I'm trying to improve the build times for FastLED. I'm seeing the same files get compiled over and over again. I'm using We have a build matrix of five boards times nineteen tests. It currently takes 7 minutes to run through the whole test suite. And this speed is by telling pio to build each ino for all board variants in one command. It would be nice if we could at least get pio to build multiple *.ino using each board, or have the build artifacts re-used for subsequent builds. |
Hi @zackees, it seems you writing in a wrong repository. Anyway, I guess the |
Hello,
Building time (
pio run
) with platformio and mbed is really long, even with minor changes in application files (and no change in mbed itself).I am now using a workaround involving tweaking scons itself to ignore the check of changes on mbed files themselves and is explained here:
https://gregwar.github.io/speedup-pio-mbed-build-and-dfu-util#speed-up-the-build-time-pio-run-w-mbed
This is really dirty but speeds up the build time by a great factor
I think it might be possible to have a faster build with other methods, one of them would be building a separate library for mbed and either build it or just use it if it exists without asking scons to scan all the files (which takes like 20s on my computer)
The text was updated successfully, but these errors were encountered: