Getting started with Argon in workbench. I notice that build times are very long. I understand why the initial build is long, but incrementals are very long, too. I’m on a very beefy machine with 10 physical cores so there’s really no shortage of power. Is there some way to speed this up? Ideally, an incremental build would only process the changed file and would do it very quickly.
Here’s what happens every time I build (and/or flash) in workbench:
> Executing task: make -f 'C:\Users\name\.particle\toolchains\buildscripts\1.2.0\Makefile' compile-user <
cd "C:/Users/name/.particle/toolchains/deviceOS/1.0.1/firmware-1.0.1//main" && make all
make[1]: Entering directory '/cygdrive/c/Users/name/.particle/toolchains/deviceOS/1.0.1/firmware-1.0.1/main'
make -C ../modules/photon/user-part all
make[2]: Entering directory '/cygdrive/c/Users/name/.particle/toolchains/deviceOS/1.0.1/firmware-1.0.1/modules/photon/user-part'
make -C ../../../user
make[3]: Entering directory '/cygdrive/c/Users/name/.particle/toolchains/deviceOS/1.0.1/firmware-1.0.1/user'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/cygdrive/c/Users/name/.particle/toolchains/deviceOS/1.0.1/firmware-1.0.1/user'
make -C ../../../hal-dynalib
make[3]: Entering directory '/cygdrive/c/Users/name/.particle/toolchains/deviceOS/1.0.1/firmware-1.0.1/hal-dynalib'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/cygdrive/c/Users/name/.particle/toolchains/deviceOS/1.0.1/firmware-1.0.1/hal-dynalib'
make -C ../../../services-dynalib
make[3]: Entering directory '/cygdrive/c/Users/name/.particle/toolchains/deviceOS/1.0.1/firmware-1.0.1/services-dynalib'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/cygdrive/c/Users/name/.particle/toolchains/deviceOS/1.0.1/firmware-1.0.1/services-dynalib'
make -C ../../../system-dynalib
make[3]: Entering directory '/cygdrive/c/Users/name/.particle/toolchains/deviceOS/1.0.1/firmware-1.0.1/system-dynalib'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/cygdrive/c/Users/name/.particle/toolchains/deviceOS/1.0.1/firmware-1.0.1/system-dynalib'
make -C ../../../rt-dynalib
make[3]: Entering directory '/cygdrive/c/Users/name/.particle/toolchains/deviceOS/1.0.1/firmware-1.0.1/rt-dynalib'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/cygdrive/c/Users/name/.particle/toolchains/deviceOS/1.0.1/firmware-1.0.1/rt-dynalib'
make -C ../../../wiring
make[3]: Entering directory '/cygdrive/c/Users/name/.particle/toolchains/deviceOS/1.0.1/firmware-1.0.1/wiring'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/cygdrive/c/Users/name/.particle/toolchains/deviceOS/1.0.1/firmware-1.0.1/wiring'
make -C ../../../communication-dynalib
make[3]: Entering directory '/cygdrive/c/Users/name/.particle/toolchains/deviceOS/1.0.1/firmware-1.0.1/communication-dynalib'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/cygdrive/c/Users/name/.particle/toolchains/deviceOS/1.0.1/firmware-1.0.1/communication-dynalib'
make -C ../../../platform
make[3]: Entering directory '/cygdrive/c/Users/name/.particle/toolchains/deviceOS/1.0.1/firmware-1.0.1/platform'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/cygdrive/c/Users/name/.particle/toolchains/deviceOS/1.0.1/firmware-1.0.1/platform'
make -C ../../../wiring_globals
make[3]: Entering directory '/cygdrive/c/Users/name/.particle/toolchains/deviceOS/1.0.1/firmware-1.0.1/wiring_globals'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/cygdrive/c/Users/name/.particle/toolchains/deviceOS/1.0.1/firmware-1.0.1/wiring_globals'
C:/Users/name/.particle/toolchains/gcc-arm/5.3.1/bin/arm-none-eabi-size --format=berkeley c:/Users/name/Documents/Particle/projects/ArgonTest02/target/ArgonTest02.elf
text data bss dec hex filename
4716 112 1408 6236 185c c:/Users/name/Documents/Particle/projects/ArgonTest02/target/ArgonTest02.elf
make[2]: Leaving directory '/cygdrive/c/Users/name/.particle/toolchains/deviceOS/1.0.1/firmware-1.0.1/modules/photon/user-part'
make[1]: Leaving directory '/cygdrive/c/Users/name/.particle/toolchains/deviceOS/1.0.1/firmware-1.0.1/main'
And each one of those make iterations takes several seconds. Any recommendations for how to speed this up?
I have never had compile or build perf problems on Windows before now. Why would this particular tool chain and process be so slow on Windows but not on Linux? I mean, make is make, right? What am I missing?
Okay, I timed it this morning. I was using “compile project” in vscode on a project that was already compiled. It took 32 (!!) seconds to do literally nothing. Just lots of “Entering directory” and “Nothing to be done” and “Leaving directory”. Surely this can’t be normal. This should take only a couple of seconds.
Is every Windows user here experiencing 30+ seconds as their minimum local build time for Particle projects?
windows defender could be scanning the file as a test you could turn it off or any other firewall/virus scan tool you may have and see if the times improve. if they do then add the folder your file resides in to the exclusions list.
I think @rickkas7 might be able to chime in on this one, though you might have to wait until tomorrow. IIRC, he had a viable explanation for the difference between Windows and Linux.
ok, i guess you need to try this,
go to windows update/security
select windows security
select virus and threat protection
look down at virus & threat protection settings
select manage settings
then turn off real-time protection
i guess you did not turn off virus scan but only firewall.
so try this.
and yes, i’m running on windows and doing this cut times from ~1min to 4-6 secs first run.
Thanks. But I’m not sure there is really an issue yet. I mean, if everyone is seeing this same bad perf then there’s probably nothing I can fix on my end. Can anyone confirm that building an unchanged particle project on Windows should take considerably less than 32 seconds (in other words, someone is actually doing this on Windows and it’s working better for them)? If so then, good, I can grind away at the problem. If not then I’ll stop wasting everyone’s time here (and just complain to particle instead )
Thanks @peekay123. So, presumably, my i9 workstation should do at least as well (assuming Argon doesn’t bring a heap more source complexity with it). Did you need to tweak any settings to improve build perf or are you using the out-of-the-box tool chain config?
@gorsat, no tweaks, just regular install of VSC and Workbench. I have both Bitdefender and Windows Defender running with no exceptions. I compiled an application with 3 libraries with an Argon target with these timings after a “Clean application (local)”:
First compile (Compile application (local): 2min 30s
Hi,
I see cygdrive referenced in your logs, so I wonder: could it be that cygwin is messing things up?
I do not know if cygwin being there is normal for a Win install, but I have zero experience on it.
Otherwise, I would invoke the super powers of @m_m . Maybe he’s got some insights on this.
our build times aren’t where we want them yet - sorry! we do install and run within a cygwin environment when running local compilation tasks on windows.
on my windows box, i see ~10m(!) for first run of the Particle: Compile application & DeviceOS (local) task, ~30s for the 2nd+ runs where we build incrementally.
on my mac box, i see ~4m 30s for first run, ~12s for 2nd+ runs.
on my linux (ubuntu) box, ~2m 30m for first run, 10s for 2nd+ runs.
in all cases, i’m compiling against Device OS v0.9.0 and targeting the argon platform with fairly trivial firmware (just blinking an LED).
so, based on this somewhat unscientific survey, i would say what you are seeing is expected.
Ouch. So sad for us Windows folks. Fwiw, the last time I ran the Atmel tool chain (which was probably pretty similar in terms of functionality), it was pretty speedy on Windows, so maybe there are some tricks you can borrow for them?