Hi there,
I’m finding that CLI commands are frequently (but not always) very slow on my 64-bit Windows 10 machine using a plain cmd.exe window. For example:
'particle --version' took 27 seconds to execute
'particle help' took 23 seconds to execute
'particle whoami' took 24 seconds to execute
Repeating this commands sometimes took equally long but also sometimes was faster:
Repeating 'particle whoami' took 24 seconds again
Repeating 'particle whoami' yet again took only 2 seconds -- odd
Repeating 'particle whoami' yet again took 23 seconds
Repeating 'particle help' took 23 seconds
Repeating 'particle help' yet again took only 4 seconds -- odd
Repeating 'particle help' yet again took 24 seconds
I chose the above commands as tests because they do not need to invoke the usb drivers or any particle hardware, but similar delays exist if I try to access my photon, argon or boron hardware using e.g. particle identify.
I’m not sure what’s going on so I checked and updated npn and node and re-installed CLI using the standard Windows Installer.
npm -v gives 8.11.0
node -v gives v16.16.0
particle version gives 3.2.0
I also used the Task Manager to check if there was excessive use by other Windows processes and I temporarily disabled Windows Defender Antivirus. There were a few temporary blips during the wait period where the highest CPU consuming process rose to 4% but most of the time it was always below 1%.
The contents of my particle directory is as follows:
06/08/2022 11:02 PM <DIR> .npm-cache
07/18/2022 04:57 PM 53 autoupdate
07/14/2022 10:34 AM <DIR> bin
07/18/2022 06:49 PM 467,156 error.log
03/26/2020 06:35 PM <DIR> node-v12.16.1-windows-x64
06/08/2022 11:02 PM <DIR> node_modules
07/14/2022 10:35 AM <DIR> NSIS-Tool.3.0.8
06/08/2022 11:02 PM 469,622 package-lock.json
06/08/2022 11:02 PM 59 plugin-cache.json
03/26/2020 06:35 PM <DIR> tmp
07/14/2022 10:35 AM 160,842 Uninstall.exe
I’ve lived with this for a while, but since Particle Workbench seems to use CLI under the hood, my Workbench workflow is heavily impacted + as a professor I am wondering how I can expect my students to use this tool if it behaves in this way.
I suspect the problem lies somehow with my machine rather than CLI, but I experienced a similar problem on another machine a few years ago. Anyway, any help or suggestions would be much appreciated.