IDE super slow to load / save - RESOLVED - due to dead path for recent sketches

I've been stuck on this for days and finally found the problem so would like to share.

My IDE was taking up to a minute to initially open and the same time to save any changes. Ends up I recently opened a few sketches from a network share (just to look at them) and the share no longer exists.

It looks like for some inexplicable reason the IDE verifies the location of all your recent sketches when saving (Bug or just bad design?) and then sits and waits for a network timeout on each one. If you have several it takes an age. I understand on load to enumerate recent sketches, but why on save!?

Anyways, to fix the problem simply delete the bad paths from preferences.txt (recent.sketches=) in your ArduinoData folder (Usually just under your Arduino work folder).

~Gaspacho

3 Likes

Thanks for that tip.

Many Thanks!!! I've been searching for a solution for ages.

In my case, it's not even a bad path, just a sleeping networked computer.

Why should the IDE ever verify these paths until you try to open one?!

I'm currently having this very problem -- hellaciously long time-delay [Arduino IDE "frozen" doing nothing], whenever I "Load" or even just "Save" a sketch.

I looked for this "preferences.txt" file and only found one in the installation directory, with a Date modified date equivalent to the installation date--i.e. little chance that it was ever updated with visited paths. And that pans out, because an inspection of the file found no recent.sketches tag, let alone any path entries that would qualify.

BTW: I searched in the Program Data directory and in the Users directory [on my Win10 PC]--no preferences.txt file--or any other file that might contain a history of this ilk.

So, does anyone out there, have any other ideas? Maybe this was changed in a subsequent update?

@ReverseEMF

Your best bet is to make the "hidden folders" visible.
That will let you see things that some of the Arduino stuff hides in.

Alternatively just hit the "File", "Preferences", then hit the direct link to the folder below the URL box.
Once that opens up CLOSE the IDE as any changes may not take properly with it still open.

Path will be along the lines of " C:\Users\name\AppData\Local\Arduino15 " unless you made any changes to the installation.

ballscrewbob:
@ReverseEMF

Your best bet is to make the "hidden folders" visible.
That will let you see things that some of the Arduino stuff hides in.

Alternatively just hit the "File", "Preferences", then hit the direct link to the folder below the URL box.
Once that opens up CLOSE the IDE as any changes may not take properly with it still open.

Path will be along the lines of " C:\Users\name\AppData\Local\Arduino15 " unless you made any changes to the installation.

Well, I learned something, today! I did already have Hidden Files set to Visible ['cuz I ain't afraid ;)], BUT, I didn't know that the Win10 search feature ignores Hidden Files, even though...!

So, I was able to find the preferences.txt file, right about where you said it might be! And, after editing out all those old paths, the save is, now, lickity-split!

So, thank you too much [as J. Wellington Wimpy would say].

Thanks. That was a great help - Ballscrewbob's post is really on the money. After weeks (what do I mean weeks - months) of waiting and waiting for the IDE to save, it is now super fast again. Thanks once more guys.

Thank you! I can't believe this is still an issue on 1.8.12! I was pulling out my hair wondering why it got so slow all of a sudden. When looking at my preferences.txt I saw entries for files on old network drives (that didn't show in the open recent dialog). It now works 100% to speed again. Seriously, THANK YOU!

@Gaspacho and @ballscrewbob, thanks both!!!

I managed to reduce the booting from ~8 to ~1 min. However, 1 min is still long. Any hints how to make the IDE start instantly?

Regs,

Zoran

@zorancenev

Some of the boot time can be reduced by DE-selecting "check for updates" in the preferences.

Extra time can also be saved by making sure the application and its paths are excluded / whitelisted from any additional security.

See second link below for some additional tips.
Could you take a few moments to Learn How To Use The Forum.
It will help you get the best out of the forum in the future.
Other general help and troubleshooting advice can be found here.

There are also other mitigating factors such as computer memory, OS setup, and other hardware specs but my main test rig is a quad core bulldozer with 16 gig and SSD's so its hard to give defined advice on that.
Laptops are among the slowest by default with RasPi SBC's being about the worst.

Bob.

Gaspacho:
I've been stuck on this for days and finally found the problem so would like to share.

I'm glad you did, this was bugging me!
Thanks