Arduino Forum

Using Arduino => Installation & Troubleshooting => Topic started by: ROVguy on May 29, 2019, 02:47 am

Title: Dead slow IDE
Post by: ROVguy on May 29, 2019, 02:47 am
Hello all.

I'm having issues with speed of Arduino IDE.
PC: SurfacePro 3 and SurfacePro 6
Arduino IDE 1.0.6, 1.8.8, 1.9.0

I was using my SP3 win10 and upgrading the Arduino IDE as new versions came available stopping at 1.8.9. I didn't have any issues with the IDE. IDE would boot in about 5sec.
 I had to replace my SP3 so I got the latest SP6. When I installed Arduino IDE 1.8.9 the bootup takes about 55sec to start the IDE, opening a sketch takes about 50 sec, compiling and saving it also took 50 sec. I replaced the IDE with 1.9.0 and had very similar results. Dead slow. Disabling virus and threat protection had no visible change on speed. I finally replaced the IDE with 1.0.6 and I got my speed back. Bootup, saving and compiling that same program takes about 5 seconds.

Does anyone know how to rectify this?
Thanks
Title: Re: Dead slow IDE
Post by: pert on May 29, 2019, 02:53 am
Try creating a file named portable in the Arduino IDE installation folder and see if that has an effect. The presence portable folder will cause the Arduino IDE to run in portable mode and not rely on any external folders. If those external folders were on a network drive or onedrive or whatever, that might explain the slowness.
Title: Re: Dead slow IDE
Post by: ROVguy on May 29, 2019, 01:33 pm
Everything is saved within C drive. No network, external or cloud folders. After creating a portable folder within the IDE installation folder on C drive the IDE doesn't boot at all. You see the IDE pops open for a moment and then disappears. 
Title: Re: Dead slow IDE
Post by: pert on May 29, 2019, 05:45 pm
After creating a portable folder within the IDE installation folder on C drive the IDE doesn't boot at all. You see the IDE pops open for a moment and then disappears. 
You must have the Arduino IDE installed to the Program Files (x86) folder. Windows 10 is very restrictive of changes to that folder. When the Arduino IDE starts, it's trying to create a sketchbook folder under the portable folder but Windows blocks that folder creation, which causes the Arduino IDE startup to fail.
Title: Re: Dead slow IDE
Post by: ROVguy on May 31, 2019, 01:13 am
You must have the Arduino IDE installed to the Program Files (x86) folder.
Pert, You are correct I did have it saved in x86. After reading your comment I uninstalled and reinstalled the IDE just inside C:. The results is still the same
Title: Re: Dead slow IDE
Post by: pert on May 31, 2019, 01:19 am
I'm sorry to hear it didn't result in any improvement. Well at least the negative result tells us that accessing external folders is not the cause of the slowness. Unfortunately I'm out of ideas. The antivirus and the external folders are the only two potential causes of slowness I could think of. Hopefully someone else here will have another idea.
Title: Re: Dead slow IDE
Post by: DrAzzy on May 31, 2019, 01:25 am
Does turning off bluetooth change anything? I recall on one occasion, under conditions I don't remember, there was some issue with some IDE (maybe Arduino, maybe something else) being insanely slow because it was trying to enumerate bluetooth serial ports, and wound up waiting through a bluetooth device search timeout or something.
Title: Re: Dead slow IDE
Post by: flounder on May 31, 2019, 06:17 am
The correct place to create a working folder in Windows is NOT under the .exe directory, but in the AppData folder for the user.  This means that if you have two different people who can log into the computer, their Arduino working directories are separate.  Only amateurs create working directories under the .exe directory.

I built windows apps for over 25 years.  The problem is learning to not follow the mistakes of people who didn't know what they were doing when they did it, and adopt the methods that are guaranteed to work.
       joe
Title: Re: Dead slow IDE
Post by: pert on May 31, 2019, 06:36 am
The correct place to create a working folder in Windows is NOT under the .exe directory, but in the AppData folder for the user.
...which is exactly what the Arduino IDE does normally. However, there are some use cases where this is not convenient or not possible. For those use cases, there is portable mode.
Title: Re: Dead slow IDE
Post by: ballscrewbob on May 31, 2019, 04:04 pm
There are a few posts about slow IDE conditions.

There are also a few differing solutions worth investigating.
Some involve computers security in regards to antivirus and such and others involve JAVA versions.

Would suggest using the search option to find them and read up a little more.

Bob.
Title: Re: Dead slow IDE
Post by: ROVguy on Jun 03, 2019, 01:49 pm
I'm sorry to hear it didn't result in any improvement. Well at least the negative result tells us that accessing external folders is not the cause of the slowness. Unfortunately I'm out of ideas. The antivirus and the external folders are the only two potential causes of slowness I could think of. Hopefully someone else here will have another idea.
Sorry, this actually did work! I did the change late and didn't add the portable folder. I finally had time to go through this again and noticed the missing folder. Once added things sped up.

Thanks
Title: Re: Dead slow IDE
Post by: pert on Jun 03, 2019, 04:00 pm
Great news! Now you could stick with portable mode or you can investigate further to try to find out how you can resolve the slowness issue when in non-portable mode. It's up to you.

When you are in non-portable mode, the Arduino IDE is accessing two external folders:
Sketchbook: The location is set in File > Preferences > Sketchbook location. When in portable mode, the default location of the sketchbook is {Arduino IDE installation folder}/portable/sketchbook. When in non-portable mode, the default location of the sketchbook is something like C:\Users\{user name}\Documents\Arduino, but it might be different if you have OneDrive enabled.
Data folder: When you are in portable mode this is located at {Arduino IDE installation folder}/portable. When in non-portable mode it is located at C:\Users\{user name}\AppData\Local\Arduino15.

So the next step in the investigation would be to determine which of those two folders were the cause of the slow down. The way you can do this is:


After doing that, there will likely be two possible results: If the Arduino IDE is still fast then you know that the problem is with the location of the data folder when not in portable mode. If the Arduino IDE is slow then you know the problem is with the location of the sketchbook folder you set in File > Preferences > Sketchbook location.
Title: Re: Dead slow IDE
Post by: ROVguy on Jun 09, 2019, 01:07 am
Well Pert. I was working on a new problem and decided to reinstall Arduino. While reinstalling it I followed flounder suggestion of installing it under  AppData. There I didn't need portable and everything seems to work just fine.

So again thanks to everyone that helped!