Arduino compiler loading computer CPU - PROBLEM SOLVED the hard way

Hi.

I installed Arduino and noticed that the compilation speed was extremely slow. I tried to deactivate anti-virus (Comodo) and there was no difference.

Have a look at the image.

When I installed it updates a couple libraries but didn't change anything significantly.

Compiling an empty project takes 1m30s, then 30s for 2nd 3rd time ... Compiling a blink project does the same.

Computer is Intel T4400, dual core, 2.2GHz, 4GB RAM. Windows 7 Ultimate.

After starting the Arduino compiler, a quiet CPU activity becomes a continuous burst of activity just for ... nothing?

Writing this message in Firefox makes CPU run at about 2% average.

Thanks for any help.
Serra Cabo

(deleted)

IDE version 1.6.7

Default folder C:\Program Files (x86)\Arduino

This computer does not have Bluetooth although a couple Bluetooth to USB sticks (adaptors) may have been inserted some month ago.

SC

Hi again.

I have been digging and found out that when Arduino compiler is running there are dozens of "listComPorts" processes running simultaneously. That seems quite strange.

Please, see the attached image.

When the compiler is closed, the processes vanish one by one at a few seconds interval. Say, one minute after and they are all gone.

Thanks
Serra Cabo

I have been looking after listComPorts.exe and found out it belongs to Arduino :slight_smile: . I ran it and I got:

C:\Program Files (x86)\Arduino\hardware\tools>listcomports -v
Searching for COM ports...
COM2 - wch.cn - USB\VID_1A86&PID_7523\5&365FBE1E&0&1
COM4 - Arduino LLC (www.arduino.cc) - USB\VID_2341&PID_0043\85438363938351502262
Found 2 ports

Thanks
Serra Cabo

I isolated listComPorts.exe renaming it to _listComPort.exe. Things are much better in terms of CPU activity (less then half), but compilation time remains about the same.

SC

Good Day,

The Intel Pentium 4 Dual Core T4400 was announced in 2009. It was billed as an entry level CPU for laptops. At its announcement it was a slower clock rate and had just 1MB L2 cache. It was intended for less demanding applications such as office, e-mail, and simple games such as solitaire.

This being said, your computer is no slouch, and Arduino compilation is not all that demanding. The real issue is that compilation is I/O bound and a lot of time is being spent waiting for the disk drive, which is likely a mechanical drive running at 4200 RPM rather than 5400 RPM. Low-cost laptop drives also suffer from slower seek time than desktop drives. As to RAM, 4GB is plenty, though 8GB might be marginally faster, as the extra RAM can be used by Windows to cache program DLL files used during Arduino compilation.

One solution to your issue is the advice to be patient. This costs you nothing but your time.

Another possibility (short of buying a more expensive computer) is to replace the laptop hard drive with a Solid State Drive. I expect your current computer takes about 45 seconds to start Windows, with a SSD it should be under 10 seconds. A 128MB drive is enough, 256MB would be better if you have a lot of video files. You could put your old drive in a USB enclosure if you really have a huge amount of data.

Check with the crucial.com web site for price and availability but with a file transfer cable/software the upgrade should run less than $100 US.

Hi.

So, it looks like the scenario you refer is typical for my Win 7 configuration in that specific entry-level laptop.

Well, looks like I found out a solution in a opposite direction you suggest.

The same do nothing code compiled in a much older Centrino with a much older 80GB HDD rotating much slower, half the memory, much less cache RAM, running XP and much lower CPU clock compiles in less than 1/3 the time and does not load the CPU while the compiler is idle.

Thanks for the "help".

SC

Ok.

Yesterday I digged something else.

While me T4400 Win7 machine continues with the same laziness concerning time to compute a Arduino do nothing code, (read above) I installed the Arduino compiler in a XP virtual machine under the same Win7 ulimate OS.

It runs the same cod in about three seconds.

So, under Win7/T4400 it takes 30s, under much older XP/Centrino machine it takes 10s, in XP_virtuel_machine/Win7/T4400 it takes 3s.

I don't know if there s something wrong with Win7 itself but I would be surprised because software like PSPICE, Solidworks, etc, run nicely in it. Also, Access compressing and recompiling or converting MDB to MDE of 60MByte code runs nicely.

Anyway, for the moment, running Arduino in XP virtual machine seems to be a solution. No problem with the USB access under virtual machine. If someone needs some more details, please just ask.

Regards
Serra Cabo

Hi.

Ok. Drastic measures. I reinstalled the 6 year old OS (windows 7 ultimate) and now the Arduino compiler runs in a couple seconds.

Didn't have any specific complaint except with Arduino compiler. I tried in another similar computer where it took 3 seconds, so I decided to reinstall the OS. I couldn't figure out what was specifically framing the compiler.

Problem solved.

Serra Cabo

Hi.

After some more tests I found out that anti-viruis Comodo significantly (10x) delays Arduino compiler performance. Even disabling ALL Comodo options it heavily delays the compiler.

That happens in Windows 7 NOT in XP. I will try and inform about what happens with some other anti-virus.

SC.

After testing Avira in the same conditions, it takes 3 seconds to compile and, it we disable Avira's "real time protection" it takes two seconds.

Comodo was the major, not the only but the major bottleneck.

SC.