File menu very slow to open

I've seen no other gripes here about this so it may well just be me, but it is becoming irritating. I use File > Open Recent a lot. In 1.8.19 clicking File opens its menu at once. But in 2.3.6 it consistently takes about 2 seconds. Worse, quite frequently it fails entirely, until I click File again.

For me it's faster than I can click

  • Click File; file menu opens instantly
  • Click Open Recent and the list (10 recent files) shows instantly.

12th gen I3, 16 GB memory, 512GB SSD, Win 11 home.

Thanks, appreciate the fast response.

My Win 10 Pro runs on a much older desktop: Intel Core i7 6700K (4.0GHz), 32 GB, 256 GB SSD. But I wouldn't expect that to make such a dramatic difference between our results. And the contrast with 1.8 is especially strange.

To see what was happening I ran ProcMon (Process Monitor). After starting it I clicked File as quickly as possible. When the IDE File menu opened, I stopped ProcMon unhurriedly. In that total period of about 11 s it delivered approx 240,000 lines of data. I filtered those to show only entries with the Processor Name Arduino IDE.exe, bringing the list down to 1,481.

Most of the info in each line is almost toally obscure to me. But I can see that during that 2 s there were 220 'CreateFile' operations and 219 of them gave the result 'PATH NOT FOUND', before getting 'SUCCESS' at the last one. The paths in question appear to be for the seven sketches I had open, including the one from which I launched the File menu click.

Does any of that offer any clues?

W10 Home, I7 6600, 8/256GB, no delays when opening menus.
It's not the configuration, it's something else...

I've still no idea what's causing this behaviour on my Win 10 PC.

BTW, I note that unlike 1.8.19 the IDE 2.3.6 menu is no longer accessible by the familiar KB shortcut method, such as <Alt + F> for File, etc.

I'm greatly appreciating some of the 2.3.6 advantages, especially opening sketches much faster. But on balance I'm considering reverting.

That's more than likely due to the underlying framework that is used. I can remember that I had endless problems with that as well when writing Tcl/Tk applications.

The Arduino IDE developers are tracking this here:

The capability should be provided by the Eclipse Theia Platform IDE framework upon which Arduino IDE is built. The Theia developers are tracking the request for adding the capability here:

If you have a GitHub account, you can subscribe to those threads to get notifications of any new developments related to this subject:


:red_exclamation_mark: Please only comment on the GitHub issue thread if you have new technical information that will assist with the resolution. General discussion and support requests are always welcome here on the Arduino Forum.


The Alt does give the menu bar focus, so it is possible to navigate the menus via keyboard; just not via the traditional "keyboard accelerator" approach.

For example, if you wanted to open the "Sketch" menu:

  1. Press and release the Alt key.
    The "File" menu item in the menu bar will be given focus.
  2. Press the key twice to select the "Sketch" menu.
  3. Press the key.
    The selected menu will open.

The logs printed by Arduino IDE might provide a clue. Please do this:

  1. Select File > Quit from the Arduino IDE menus if it is running.
    All Arduino IDE windows will close.
  2. Start Windows "File Explorer".
  3. Open the Arduino IDE installation folder.
    The default installation location is at one of the following paths:
    • C:\Program Files\Arduino IDE
      
    • C:\Users\<username>\AppData\Local\Programs\Arduino IDE
      
      (where <username> is your Windows username)
      :red_exclamation_mark: If looking for it with your file manager or command line, note that the AppData folder is hidden by default. On Windows "File Explorer", you can make it visible by opening the "View" menu, then checking the box next to "☐ Hidden items".
  4. In the folder listing of the Arduino IDE installation folder, hold the Shift key while clicking the right hand button on the mouse.
    A context menu will open.
  5. Select "Open PowerShell window here" from the menu.
    Windows PowerShell will now open with the current directory set to the Arduino IDE installation folder.
  6. Type the following command in the PowerShell window:
    & ".\Arduino IDE"
    
  7. Press the Enter key.
    Debug output should now be printed to the PowerShell window as Arduino IDE starts.
  8. Wait for Arduino IDE to finish starting.
  9. Open the "File" menu.
  10. Wait for the menu to open.
  11. Switch back to the PowerShell window.
  12. Press the Ctrl+Shift+A keyboard shortcut.
    This will select all the text in the PowerShell window.
  13. Press the Ctrl+C keyboard shortcut.
    This will copy the contents of the PowerShell window to the clipboard.
  14. Open a reply here on this forum topic by clicking the "Reply" button.
  15. Click the <CODE/> icon on the post composer toolbar.
    This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
  16. Press the Ctrl+V keyboard shortcut.
    This will paste the output into the code block.
  17. Move the cursor outside of the code block markup before you add any additional text to your reply.
  18. Click the "Reply" button to publish the post.

Please let us know if you have any questions or problems while following those instructions.

Thanks for getting on the case.

I had this error message while attempting to paste that lengthy PS data:
"An error occurred: Body is limited to 120000 characters; you entered 162832."
So here's a ZIP:
ReplyToPtillisch.zip (17.9 KB)

The time from click to appearance this time was rather shorter, about 1.4 s. Possibly because only a single sketch was open? Most of that time must have been in the first 13 lines, which I see have no timestamps, because the remainder account for only about 140 ms.

Thanks, understood. Ever hopeful, I tried <Alt> then Enter but, of course, it made no difference.

Unfortunately I didn't find any "smoking gun" there. I do see that you have a lot of sketches in your sketchbook. The File > Sketchbook submenu has an item for each of the sketches in the sketchbook, so it might be that the entire menu structure is generated when you open the "File" menu (as opposed to only generating the root structure and deferring the generation of submenus until they might be opened), and it simply takes a lot of processing to generate the massive structure that results from a sketchbook with many sketches.

To test this hypothesis, please try the following experiment:

  1. Select File > Preferences... from the Arduino IDE menus.
    The "Preferences" dialog will open.
  2. Change the "Sketchbook location" preference to the path of an empty folder.
  3. Click the "OK" button.
    The "Preferences" dialog will close.
  4. Open the "File" menu.

Does the problem of the exceptional "File" menu opening duration still occur after you have changed to an empty sketchbook?

I'm not sure I understood correctly what you mean by this.

By "no difference", do you mean that the problem of the exceptional "File" menu opening duration still occurs even when you open the "File" menu via this shortcut?

Or do you instead mean that the "File" menu does not open when you attempt to use that procedure to open the menu via the keyboard.

I think that the output you shared only contains entries that were produced during the Arduino IDE startup. Under normal conditions, Arduino IDE doesn't produce any logs at all when you open the "File" menu. You can test this by the following procedure:

  1. Start Arduino IDE from the PowerShell terminal, just as you did before.
  2. Wait for Arduino IDE to finish starting.
  3. Switch to the PowerShell window.
  4. Watch the PowerShell window for a short time to be certain that no additional output is being produced by the processes associate with starting Arduino IDE.
  5. Take note of the last line of the output.
  6. Switch back to the Arduino IDE window.
  7. Open the "File" menu.
  8. Wait for the "File" menu to finish opening.
  9. Switch to the PowerShell window.

The expected result is that no additional content will have been added to the PowerShell window after the line you noted in step 5 of that procedure.


If you examine the output, you may note these lines:

These are generated when Arduino IDE scans the contents of the sketchbook folder to get a list of all your sketches, which is used to populate the File > Sketchbook menu, and the "SKETCHBOOK" view in the left side panel. However, this scan is done during startup of Arduino IDE (and again if Arduino IDE detects any changes to the content of the sketchbook folder), not on opening the "File" menu. So the actual scan process that generates those lines does not contribute to the duration of opening the "File" menu.

All these warnings might appear alarming, but they don't necessarily indicate a problem. An Arduino sketch must contain a primary .ino file with name matching the sketch folder name. So if a folder is found under the sketchbook folder that does not meet that requirement, that is indeed a sign of user error and perhaps worth logging. However, sketches may contain supplemental files. It seem that this was not given consideration when writing the code that produces these log entries, and so we get spurious warnings in the logs for valid sketches in the sketchbook folder which contain a supplemental .ino file. So I wouldn't assume these warnings are directly related to the problem of the exceptional "File" menu opening duration.

Appreciate your recent replies, thank you. I will follow those suggestions and report their results as soon as I can.

Meanwhile do you think we can rule out what I first thought was the main clue, namely that 1.8.19 does not display the problem delay. Both IDE versions have the same sketchbook folder and therefore presumably the same libraries.

Yet it seems so far that I’m the only one reporting the issue, so….

It is certainly worth noting. However, despite having the same purpose and similar UI designs, the underlying implementation of the menus is completely different between the two applications. This makes it difficult to draw any specific conclusions from your observation.

It might be that Arduino IDE 1.x generates the menu structure only once at startup (and you wouldn't really notice the 2 s duration at startup), while Arduino IDE 2.x generates it on demand each time you open the menu.

It might be that Arduino IDE 1.x only generates the File > Sketchbook submenu structure if you open that submenu, while Arduino IDE 2.x generates the entire File menu structure when you open it. This hypothesis is easy to test, since if correct we would expect to see a significant delay when opening the File > Sketchbook submenu in 1.x compared to doing the same in 2.x.

It might be that both IDE versions use the same approach to generating the menu structure, but the 1.x implementation is significantly more efficient.

90% of the way through composing this a couple of hours ago I went downstairs for lunch. During that we had a brief power cut and I was then unable to find my work. Reconstructed below. Covers the points you raised in your last three helpful posts. But good news - means you might want to skip or postpone the rest entirely: PROBLEM GONE! See about half way down.

#1
YOU
Unfortunately I didn't find any "smoking gun" there. I do see that you have a lot of sketches in your sketchbook. The File > Sketchbook submenu has an item for each of the sketches in the sketchbook, so it might be that the entire menu structure is generated when you open the "File" menu (as opposed to only generating the root structure and deferring the generation of submenus until they might be opened), and it simply takes a lot of processing to generate the massive structure that results from a sketchbook with many sketches.

To test this hypothesis, please try the following experiment:

Select File > Preferences... from the Arduino IDE menus.
The "Preferences" dialog will open.
Change the "Sketchbook location" preference to the path of an empty folder.
Click the "OK" button.
The "Preferences" dialog will close.
Open the "File" menu.
Does the problem of the exceptional "File" menu opening duration still occur after you have changed to an empty sketchbook?

ME
I tried then Enter but, of course, it made no difference.

YOU
I'm not sure I understood correctly what you mean by this.

By "no difference", do you mean that the problem of the exceptional "File" menu opening duration still occurs even when you open the "File" menu via this shortcut?

ME
Yes, just in case IDE 2.3.6 had some significantly different method of processing mouse clicks!

#2
YOU
Most of that time must have been in the first 13 lines, which I see have no timestamps, because the remainder account for only about 140 ms.

I think that the output you shared only contains entries that were produced during the Arduino IDE startup. Under normal conditions, Arduino IDE doesn't produce any logs at all when you open the "File" menu. You can test this by the following procedure:

Start Arduino IDE from the PowerShell terminal, just as you did before.
Wait for Arduino IDE to finish starting.
Switch to the PowerShell window.
Watch the PowerShell window for a short time to be certain that no additional output is being produced by the processes associate with starting Arduino IDE.
Take note of the last line of the output."

ME
Last two lines are:
2025-07-22T11:35:04.106Z daemon INFO time="2025-07-22T12:35:04+01:00" level=info msg="Adding libraries dir" dir="c:\Users\terry\Dropbox\Agent (Sundry)\EMPTY\libraries" isSingleLibrary=false location=user

Update for version 2.3.6 is not available (latest version: 2.3.6, downgrade is allowed). (Don't follow that, but presumably irrelevant to current context.)

YOU
"Switch back to the Arduino IDE window.
Open the "File" menu."

ME
Which was immediate! <<----------------------------------------------------
Tested opening File several times again before composing this - AND LOOKS LIKE THE PROBLEM IS OVER! Note that this was before the power cut.

YOU
Wait for the "File" menu to finish opening.
Switch to the PowerShell window.
The expected result is that no additional content will have been added to the PowerShell window after the line you noted in step 5 of that procedure.

ME
Yes, that's what I see, no additions.

YOU
If you examine the output, you may note these lines:


2025-07-20T12:56:03.713Z sketches-service WARN Mismatching sketch file <LEDs_RGB.ino> and sketch folder name <RANDOM>. Skipping
2025-07-20T12:56:03.713Z sketches-service WARN Mismatching sketch file <Rob-ra_300.ino> and sketch folder name <ARRAYS>. Skipping
2025-07-20T12:56:03.714Z sketches-service WARN Mismatching sketch file <nRF24L01.ino> and sketch folder name <RADIO_TxRx>. Skipping
2025-07-20T12:56:03.714Z sketches-service WARN Mismatching sketch file <ResetFunction.ino> and sketch folder name <RESET>. Skipping
2025-07-20T12:56:03.714Z sketches-service WARN Mismatching sketch file <Sunrise_ChatGPT_10.ino> and sketch folder name <sketch_feb05j>. Skipping
2025-07-20T12:56:03.714Z sketches-service WARN Mismatching sketch file <SparkfunExample.ino> and sketch folder name <SERIAL>. Skipping
2025-07-20T12:56:03.714Z sketches-service WARN Mismatching sketch file <CombinedRxTx.ino> and sketch folder name <RADIO_TxRx>. Skipping
2025-07-20T12:56:03.714Z sketches-service WARN Mismatching sketch file <Rob-ra_MinMaxTest.ino> and sketch folder name <ARRAYS>. Skipping
2025-07-20T12:56:03.714Z sketches-service WARN Mismatching sketch file <MPU6050_raw.ino> and sketch folder name <SENSORS_Misc>. Skipping

ME
Not here, no sign of those. No hits for strings like 'mismatching', 'skipping', etc. But did get just the following single hit for 'sketches-service':

2025-07-22T11:35:00.014Z sketches-service WARN Warning! The request sketch path was different than the response sketch path from the CLI. This could be a potential bug. Request: <c:\Users\terry\Dropbox\Electronics\Arduino\SKETCHES\MY SKETCHES\PROJECTS_Arduino\IR-HX1838-exp\LIBRARY-IRremote-NEW-4\AllProtocoIsOnLCD-IRremote-VariousResults-e1-noLCD\AllProtocoIsOnLCD-IRremote-VariousResults-e1-noLCD.ino>, response: <c:\Users\terry\Dropbox\Electronics\Arduino\SKETCHES\MY SKETCHES\PROJECTS_Arduino\IR-HX1838-exp\LIBRARY-IRremote-NEW-4\AllProtocoIsOnLCD-IRremote-VariousResults-e1-noLCD>.

YOU
"These are generated when Arduino IDE scans the contents of the sketchbook folder to get a list of all your sketches, which is used to populate the File > Sketchbook menu, and the "SKETCHBOOK" view in the left side panel. However, this scan is done during startup of Arduino IDE (and again if Arduino IDE detects any changes to the content of the sketchbook folder), not on opening the "File" menu. So the actual scan process that generates those lines does not contribute to the duration of opening the "File" menu.

All these warnings might appear alarming, but they don't necessarily indicate a problem. An Arduino sketch must contain a primary .ino file with name matching the sketch folder name. So if a folder is found under the sketchbook folder that does not meet that requirement, that is indeed a sign of user error and perhaps worth logging. However, sketches may contain supplemental files. It seem that this was not given consideration when writing the code that produces these log entries, and so we get spurious warnings in the logs for valid sketches in the sketchbook folder which contain a supplemental .ino file. So I wouldn't assume these warnings are directly related to the problem of the exceptional "File" menu opening duration."

#3
ME
do you think we can rule out what I first thought was the main clue, namely that 1.8.19 does not display the problem delay. Both IDE versions have the same sketchbook folder and therefore presumably the same libraries.

YOU
It is certainly worth noting. However, despite having the same purpose and similar UI designs, the underlying implementation of the menus is completely different between the two applications. This makes it difficult to draw any specific conclusions from your observation.

It might be that Arduino IDE 1.x generates the menu structure only once at startup (and you wouldn't really notice the 2 s duration at startup), while Arduino IDE 2.x generates it on demand each time you open the menu.

It might be that Arduino IDE 1.x only generates the File > Sketchbook submenu structure if you open that submenu, while Arduino IDE 2.x generates the entire File menu structure when you open it. This hypothesis is easy to test, since if correct we would expect to see a significant delay when opening the File > Sketchbook submenu in 1.x compared to doing the same in 2.x.

It might be that both IDE versions use the same approach to generating the menu structure, but the 1.x implementation is significantly more efficient.

ME
Whatever! You might well now be able to diagnose the cause of this sudden but welcome 'resolution'! I'd love to know too, but meanwhile I'm just happy to get it fixed. Never was a big deal, of course. Even someone as impatient as me can tolerate a 2 s delay a few dozen times a day if I have to. I just fret over unsolved mysteries!

In case you want to continue the forensics, here's the PS output I described above.

C:\Users\terry\Dropbox\Electronics\Arduino\Arduino (Sundry)\SlowOpen-PSoutput-2.zip

Using Win 10, Version 22H2 (OS Build 19045.6093)

Is this result from the empty sketchbook experiment I proposed in post #12? Or is the problem resolved even when you have your "Sketchbook location" preference set to your normal sketchbook folder that contains many sketches.

Those lines are taken from the output you shared in post #10.

Did you change your sketchbook location for the experiment I proposed in post #12? Those "warnings" are generated by the sketches present in the sketchbook folder you had configured during the session that produced that output, so it is expected that you would no longer see those warnings in the output after you change your "Sketchbook location" preference.

This is another example of naive code generating spurious warnings. An Arduino sketch is a folder, so it is correct that the response is the path of the folder, not of a specific .ino file. It is unfortunate that we must sift through these warnings to find the actual meaningful information in the logs, but that's just the imperfect reality we are living in.

I have the same sentiment.

Duh, yes, I stupidly forgot to restore the \SKETCHES location from its temporary empty one. Such is the power of wishful thinking!
:roll_eyes:

I'll have another crack at it, but not yet.

Did you check the drafts?

1 Like

I composed it in my text editor, prior to opening a forum reply. There was no trace anywhere after the power came back.