Starting IDE2.x very very slow

Since the update to version 2.x the program start is very slow. It got better since 2.0, but still very slow.
In the recent days I had to reopen an old version of MARLIN which consists of dozens if files. Opening this project took more than half an hour (from SSD...).
After that, it was "impossible" to reopen the IDE, as it tried to reopen that project immediately w/o the possibility to interrupt the open process (solved).
During solving that I found an endless number of warnings (one line for each and every of my .ino files in my projects on the PC) from the IDE when starting it from the PowerShell with the "bareMinimum" Project:
2024-09-28T05:08:27.904Z sketches-service WARN Mismatching sketch file <config_help.ino> and sketch folder name <Espresso10.5>. Skipping
This seem to be one of the reasons for the laggy startup. How can I solve this?

You can search the forum and see if it's a known issue :wink: Search results for '#software:ide-2-x marlin' - Arduino Forum. Knowing (I understand that you don't know) that @ptillisch has provided help (and solutions) for the issue and you can add that to the search: Search results for '#software:ide-2-x marlin @ptillisch' - Arduino Forum

One possible solution is provided in IDE hangs when loading Marlin sketch - #2 by ptillisch


You don't mention which operating system you're using. Under Windows, you can delete the below two files (after closing the IDE) so the IDE will not reload the old sketches.

  1. C:\Users\yourUsername.arduinoIDE\recent-sketches.json
  2. C:\Users\yourUsername.arduinoIDE\recentworkspace.json

If in doubt, make backups so you can restore if needed.

Regarding the first part of your reply (Marlin) I already wrote that it is solved (with the help of older forum issues :wink: )

I had a short look in the "recent..." files you mention. They only refer to the 10 most recent opened projects, and not to the whole bunch of .ino files contained in all of my projects (a few thousand including all (project-)versions existing).

I'm still wondering why the IDE (2.3.3) is browsing all my old work on every startup and just waste my time. And I'm wondering what should be wrong with all these projects ( sketches-service WARN...) as they can be opened and I can work with. In fact I do not understand the warning message...

It was not clear to me that you succeeded in solving it :wink: Sorry for that.

I do not know.

There is nothing wrong with them. The IDE kind of expects an ino file to be in a directory with the same name. If it finds (during startup) a file called config_help.ino in a directory called Espresso10.5 it just tells you that it doesn't match; maybe a little silly, maybe time for a little improvement with that in a future release. As long as you have a file Espresso10.5.ino in the Espresso10.5 directory, you can work with them.

I do not know if it's the reason. You can only solve that by starting to use .h and .cpp files instead of multiple .ino files.

Ok, now it is clear! This makes sense. And yes, there is (in this case) a Espresso10.5.ino file in the Espresso10.5 directory.

I think this alone might not be the breakthrough as I can see in the timestamps that it takes only milliseconds per file, if at all. But I was wondering about this background job and its messages I did not understand.

My observation of the real slow startup part is the opening of the discrete files in a project: in my own projects it takes around a second per .ino file in the project to open which can easily take 10s and more for a project to just open or to save (under a new filename) which can be annoying when saving the work continuously.
For the Marlin project mentioned above it took 5-10 or more seconds per (huge) .h or .cpp file for over 300 it consists of. In sum half an hour or so; for me a sign that such a project is no more possible to be developed or maintained with the IDE 2.x .
With the IDE 1.x I never experienced such (notable) delays. For that I started to use the IDE 2.x only after may be a year after the initial release (and several tries in between...) when the delays got passable and I did not want to go further without several new functions in 2.x :smiley:

My personal opinion is, that the IDE is analyzing the files during the opening process of them to prepare this and that instantaneously (!) for any convenient IDE functions, but in the end it is (also) for my inconvenience (due to the lag) or it will make the work even impossible at all (Marlin).

Hi @purehunter

I agree that these warnings are worthless and annoying. However, I very much doubt that they have any significant impact on the startup time.

To test this, I created 130 multi-file sketches in my sketchbook, which generated 390 of these (yes, it prints three of the pointless warnings for every sketch!). The timestamps on the logs show that they were printed over the course of about 0.5 s (which seems to align well with the "I can see in the timestamps that it takes only milliseconds per file" observation you made). Keep in mind that 0.5 s is not the time added to startup by the presence of the warnings, but rather the time the IDE took to process all those sketch folders, as well as performing the other processes that are running in parallel processes. 0.5 s seems reasonable for processing that many sketch folders alone so I don't see any evidence that the warnings have any impact.

You are correct that it is impossible to use obsolete versions of Marlin, and that is unfortunate. However, you should not have any problems using modern versions of Marlin with Arduino IDE 2.x.

The Marlin developers put all the hundreds of code files in the root of the sketch folder during the Marlin 1.x era. Arduino IDE automatically shows an editor tab for each code file in the root of the sketch, which caused problems even for Arduino IDE 1.x users (e.g., its tab navigation features were not very effective with so many tabs). So the developers made the smart move to structure the project into subfolders, leaving only the files the user actually needs access to in the root. Arduino IDE only automatically creates tabs for the files in the root, so the files in the subfolders don't impact the load time.

This restructuring was released in version 2.0.0 of the Marlin firmware, ~5 years ago. So any modern version of Marlin should be perfectly usable with Arduino IDE 2.x. Beyond this benefit, it is likely that you would receive many other fixes and enhancements by updating from a Marlin 1.x version as well.


Although you should not need to access the files from the Marlin 2.x subfolders, since they are the internal implementation code and all the configuration files are in the root, with other large sketch projects you might still want to access files from subfolders on demand. This is possible when using Arduino IDE 2.x. I'll describe the procedure:

  1. Select File > Preferences... (or Arduino IDE > Settings... for macOS users) from the Arduino IDE menus.
    The "Preferences" dialog will open.
  2. Check the box next to "Show files inside Sketches" in the "Preferences" dialog.
  3. Click the "OK" button.
    The "Preferences" dialog will close.
  4. Click the folder icon in the activity bar on the left side of the IDE window to open the "SKETCHBOOK" view.
  5. You will see a listing of the contents of your sketchbook folder. Click the icons to the left of the relevant entries to navigate to the file you want to open.
  6. Click on the file in the "SKETCHBOOK" view.

The file will open in a new editor tab. You can browse and edit the contents as needed. When you no longer need the tab, click the X icon on the tab to close it.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.