Skip to content

Takes x 6 times to load in compare to the old IDE #876

Closed
@zaid894

Description

@zaid894

Describe the bug
Takes so much time to launch and load sketches that you allmostly forget what have you been waiting for, the load time is really too long in compare to the old IDE.

I have an M.2 and 2 x 4GB 3200 MHz RAM though it takes the 2.0 IDE around 31 Seconds to start and load a sketch while 4.5 Seconds at version 1.8.

To Reproduce
Steps to reproduce the behavior:

  1. Run a sketch
  2. Use a stop watch.

Expected behavior
I was expecting for much better launch time.

Desktop (please complete the following information):

  • Windows 11
  • 2.0.0-rc3

Activity

ubidefeo

ubidefeo commented on Mar 2, 2022

@ubidefeo

@zaid894
We are aware of the startup-time issue, but in order to better investigate can you give us more info?

  • number of installed libraries (you can count the folders in the Sketchbook's libraries folder)
  • number of platforms installed and which ones
    example:
  • AVR
  • SAMD
  • MBED
  • ESP32
  • ESP8266
  • STM32Duino

Thank you :)

ckuethe

ckuethe commented on Mar 3, 2022

@ckuethe

In my current installation, I have 47 libraries (I used to have over 280) and 21 platforms. I just restarted the IDE and it took 19 seconds from typing arduino-ide in a terminal until my sketch was open.

(Samsung Evo970+ SSD, 40GB Ram, "11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz")

Platforms:

daemon INFO Loaded platform [platform: {ID:"AmbaSat-1:avr",Installed:"1.0.4",Latest:"1.0.4",Name:"AmbaSat-1 Satellite Board"}]
daemon INFO Loaded platform [platform: {ID:"CubeCell:CubeCell",Installed:"1.4.0",Latest:"1.4.0",Name:"CubeCell Development Framework"}]
daemon INFO Loaded platform [platform: {ID:"Heltec-esp32:esp32",Installed:"0.0.6",Latest:"0.0.6",Name:"Heltec ESP32 Series Dev-boards"}]
daemon INFO Loaded platform [platform: {ID:"MightyCore:avr",Installed:"2.1.3",Latest:"2.1.3",Name:"MightyCore"}]
daemon INFO Loaded platform [platform: {ID:"Sanguino:avr",Installed:"1.0.3",Latest:"1.0.3",Name:"Sanguino"}]
daemon INFO Loaded platform [platform: {ID:"Seeeduino:samd",Installed:"1.8.2",Latest:"1.8.2",Name:"Seeed SAMD Boards"}]
daemon INFO Loaded platform [platform: {ID:"arduino:avr",Installed:"1.8.5",Latest:"1.8.5",Name:"Arduino AVR Boards"}]
daemon INFO Loaded platform [platform: {ID:"arduino:mbed_nano",Installed:"2.7.2",Latest:"2.7.2",Name:"Arduino Mbed OS Nano Boards"}]
daemon INFO Loaded platform [platform: {ID:"arduino:mbed_rp2040",Installed:"2.7.2",Latest:"2.7.2",Name:"Arduino Mbed OS RP2040 Boards"}]
daemon INFO Loaded platform [platform: {ID:"arduino:sam",Installed:"1.6.12",Latest:"1.6.12",Name:"Arduino SAM Boards (32-bits ARM Cortex-M3)"}]
daemon INFO Loaded platform [platform: {ID:"arduino:samd",Installed:"1.8.13",Latest:"1.8.13",Name:"Arduino SAMD Boards (32-bits ARM Cortex-M0+)"}]
daemon INFO Loaded platform [platform: {ID:"arduino:samd_beta",Installed:"1.6.25",Latest:"1.6.25",Name:"Arduino SAMD (32-bits ARM Cortex-M0+) Beta Boards"}]
daemon INFO Loaded platform [platform: {ID:"digistump:avr",Installed:"1.6.7",Latest:"1.6.7",Name:"Digistump AVR Boards"}]
daemon INFO Loaded platform [platform: {ID:"esp32:esp32",Installed:"1.0.6",Latest:"1.0.6",Name:"esp32"}]
daemon INFO Loaded platform [platform: {ID:"esp8266:esp8266",Installed:"3.0.2",Latest:"3.0.2",Name:"esp8266"}]
daemon INFO Loaded platform [platform: {ID:"heltec-esp8266:esp8266",Installed:"0.0.4",Latest:"0.0.4",Name:"Heltec ESP8266 Series Dev-boards"}]
daemon INFO Loaded platform [platform: {ID:"megax4:avr",Installed:"1.0.3",Latest:"1.0.3",Name:"ATmega644P/1284P Boards"}]
daemon INFO Loaded platform [platform: {ID:"megax8:avr",Installed:"1.0.3",Latest:"1.0.3",Name:"ATmega168P/328P Boards"}]
daemon INFO Loaded platform [platform: {ID:"rabid prototypes:samd",Installed:"1.6.5",Latest:"1.6.5",Name:"Rabid Prototypes SAMD Boards"}]
daemon INFO Loaded platform [platform: {ID:"tiny:avr",Installed:"1.0.6",Latest:"1.0.6",Name:"ATtiny extra Boards"}]
daemon INFO Loaded platform [platform: {ID:"breadboard:avr",Name:"breadboard-avr"}]

Libraries

Adafruit_AMG88xx_Library
Adafruit_BME280_Library
Adafruit_BusIO
Adafruit_Circuit_Playground
Adafruit_GFX_Library
Adafruit_GPS_Library
Adafruit_ILI9341
Adafruit_INA219
Adafruit_LED_Backpack_Library
Adafruit_MLX90614_Library
Adafruit_NeoPixel
Adafruit_seesaw_Library
Adafruit_SHTC3_Library
Adafruit_SleepyDog_Library
Adafruit_SSD1306
Adafruit_ST7735_and_ST7789_Library
Adafruit_STMPE610
Adafruit_TouchScreen
Adafruit_Unified_Sensor
Adafruit_Zero_DMA_Library
Adafruit_Zero_FFT_Library
Adafruit_Zero_PDM_Library
ArduinoINA219
AsyncElegantOTA
DebounceEvent
DS18B20
ElegantOTA
ESP32_ESP32S2_AnalogWrite
ESP32Time
GY39
HamShield
Heltec_ESP32_Dev-Boards
HX711
IRremoteESP8266
Keyboard
Max44009
MAX44009_library
Mouse
OneWire
RTClib
SD
SparkFun_Ambient_Light_Sensor_Arduino_Library
SPL06-007
SSD1306Ascii
TickTwo
Vishay_VEML6031X00
WaveHC

I see lots of stuff like this in the output: the IDE making a bunch of connections to check for updates before loading the editor. These checks should be deferred and run in the background.

daemon INFO Checking signature [error: opening signature file: open /tmp/015985528.sig: no such file or directory, index: /tmp/015985528, signaturefile: /tmp/015985528.sig]
daemon INFO URL: http://digistump.com/package_digistump_index.json
daemon INFO Updating index [url: http://digistump.com/package_digistump_index.json]
root INFO Updating index: package_digistump_index.json completed.
daemon INFO Checking signature [error: opening signature file: open /tmp/677731690.sig: no such file or directory, index: /tmp/677731690, signaturefile: /tmp/677731690.sig]
daemon INFO URL: http://www.leonardomiliani.com/repository/package_leonardomiliani.com_index.json
daemon INFO Updating index [url: http://www.leonardomiliani.com/repository/package_leonardomiliani.com_index.json]
root INFO Updating index: package_leonardomiliani.com_index.json completed.
daemon INFO Checking signature [error: opening signature file: open /tmp/338670529.sig: no such file or directory, index: /tmp/338670529, signaturefile: /tmp/338670529.sig]
daemon INFO URL: https://ambasat.com/boards/package_ambasat-1.com_index.json
daemon INFO Updating index [url: https://ambasat.com/boards/package_ambasat-1.com_index.json]
root INFO Updating index: package_ambasat-1.com_index.json completed.
daemon INFO Checking signature [error: opening signature file: open /tmp/528653356.sig: no such file or directory, index: /tmp/528653356, signaturefile: /tmp/528653356.sig]
daemon INFO URL: https://arduino.esp8266.com/stable/package_esp8266com_index.json
daemon INFO Updating index [url: https://arduino.esp8266.com/stable/package_esp8266com_index.json]
root INFO Updating index: package_esp8266com_index.json completed.
daemon INFO Checking signature [error: opening signature file: open /tmp/755262875.sig: no such file or directory, index: /tmp/755262875, signaturefile: /tmp/755262875.sig]
daemon INFO URL: https://dl.espressif.com/dl/package_esp32_index.json
daemon INFO Updating index [url: https://dl.espressif.com/dl/package_esp32_index.json]
root INFO Updating index: package_esp32_index.json completed.
daemon INFO Checking signature [error: opening signature file: open /tmp/678005822.sig: no such file or directory, index: /tmp/678005822, signaturefile: /tmp/678005822.sig]
daemon INFO URL: https://files.seeedstudio.com/arduino/package_seeeduino_boards_index.json
daemon INFO Updating index [url: https://files.seeedstudio.com/arduino/package_seeeduino_boards_index.json]
root INFO Updating index: package_seeeduino_boards_index.json completed.
daemon INFO Checking signature [error: opening signature file: open /tmp/832171141.sig: no such file or directory, index: /tmp/832171141, signaturefile: /tmp/832171141.sig]
daemon INFO URL: https://mcudude.github.io/MightyCore/package_MCUdude_MightyCore_index.json
daemon INFO Updating index [url: https://mcudude.github.io/MightyCore/package_MCUdude_MightyCore_index.json]
root INFO Updating index: package_MCUdude_MightyCore_index.json completed.
daemon INFO Checking signature [error: opening signature file: open /tmp/988278816.sig: no such file or directory, index: /tmp/988278816, signaturefile: /tmp/988278816.sig]
daemon INFO URL: https://rabidprototypes.com/arduino/package_rabidprototypes_index.json
daemon INFO Updating index [url: https://rabidprototypes.com/arduino/package_rabidprototypes_index.json]
root INFO Updating index: package_rabidprototypes_index.json completed.
daemon INFO Checking signature [error: opening signature file: open /tmp/220566271.sig: no such file or directory, index: /tmp/220566271, signaturefile: /tmp/220566271.sig]
daemon INFO URL: https://raw.githubusercontent.com/Lauszus/Sanguino/master/package_lauszus_sanguino_index.json
daemon INFO Updating index [url: https://raw.githubusercontent.com/Lauszus/Sanguino/master/package_lauszus_sanguino_index.json]
root INFO Updating index: package_lauszus_sanguino_index.json completed.
daemon INFO Checking signature [error: opening signature file: open /tmp/360745042.sig: no such file or directory, index: /tmp/360745042, signaturefile: /tmp/360745042.sig]
daemon INFO URL: https://resource.heltec.cn/download/package_CubeCell_index.json
daemon INFO Updating index [url: https://resource.heltec.cn/download/package_CubeCell_index.json]
root INFO Updating index: package_CubeCell_index.json completed.
daemon INFO Checking signature [error: opening signature file: open /tmp/662187401.sig: no such file or directory, index: /tmp/662187401, signaturefile: /tmp/662187401.sig]
daemon INFO URL: https://resource.heltec.cn/download/package_heltec_esp32_index.json
daemon INFO Updating index [url: https://resource.heltec.cn/download/package_heltec_esp32_index.json]
root INFO Updating index: package_heltec_esp32_index.json completed.
daemon INFO Checking signature [error: opening signature file: open /tmp/658981204.sig: no such file or directory, index: /tmp/658981204, signaturefile: /tmp/658981204.sig]
daemon INFO URL: https://resource.heltec.cn/download/package_heltec_esp8266_index.json
daemon INFO Updating index [url: https://resource.heltec.cn/download/package_heltec_esp8266_index.json]
root INFO Updating index: package_heltec_esp8266_index.json completed.
daemon INFO Checking signature [error: opening signature file: open /tmp/213301411.sig: no such file or directory, index: /tmp/213301411, signaturefile: /tmp/213301411.sig]
daemon INFO Updating libraries index
root INFO Updating index: library_index.json.gz completed.
root INFO Updating index: library_index.json.sig completed.
ckuethe

ckuethe commented on Mar 3, 2022

@ckuethe
root WARN Frontend keybindings.onStart is slow, took: 193.1 ms
root ERROR DefaultJsonSchemaContribution.registerSchemas is taking more than 500.0 ms, new schemas are ignored.
...
root WARN Frontend EditorNavigationContribution.onStart is slow, took: 19406.7 ms
...
root INFO [b35162f2-f205-4035-9499-3ce2055c3d9c] Waiting for backend deployment took: 250.6 ms [Finished 21.166 s after frontend start]
root INFO [b35162f2-f205-4035-9499-3ce2055c3d9c] Sync of 5 plugins took: 253.8 ms [Finished 21.420 s after frontend start]
Update for version 2.0.0-rc4 is not available (latest version: 2.0.0-rc4, downgrade is allowed).
...
root INFO [b35162f2-f205-4035-9499-3ce2055c3d9c] Load contributions of 5 plugins took: 88.6 ms [Finished 22.200 s after frontend start]
root INFO Finished loading frontend application after 22.231 seconds
ubidefeo

ubidefeo commented on Mar 4, 2022

@ubidefeo

thank you @ckuethe for the comprehensive output.
we'll look into why all those signature errors show up

u.

self-assigned this
on Mar 4, 2022
ckuethe

ckuethe commented on Mar 4, 2022

@ckuethe

I don't think the signature errors are as important as not blocking app startup while checking for updates. When I turn off my network the IDE loads much more quickly: root INFO Finished loading frontend application after 5.734 seconds

ckuethe

ckuethe commented on Mar 14, 2022

@ckuethe

Wow. rc5 is even worse.

root WARN Frontend EditorNavigationContribution.onStart is slow, took: 259339.6 ms
root INFO Board config changed: 
root INFO Board config changed: 
root INFO [hosted-plugin: 1581552] PLUGIN_HOST(1581552) starting instance
root INFO Changed application state from 'init' to 'started_contributions'.
root INFO Changed application state from 'started_contributions' to 'attached_shell'.
root INFO >>> Restoring the layout state...
Checking for update
root INFO [29567868-3050-46bf-ae98-8526924c68fe] Waiting for backend deployment took: 295.9 ms [Finished 260.987 s after frontend start]
root INFO Board config changed: 
serial-service INFO >>> Disposing serial connection...
serial-service WARN <<< Not connected. Nothing to dispose.
serial-service INFO >>> Disposing serial connection...
serial-service WARN <<< Not connected. Nothing to dispose.
root INFO [29567868-3050-46bf-ae98-8526924c68fe] Sync of 5 plugins took: 279.8 ms [Finished 261.267 s after frontend start]
Found version 2.0.0-rc5 (url: arduino-ide_2.0.0-rc5_Linux_64bit.AppImage)
root INFO <<< The layout has been successfully restored.
kittaakos

kittaakos commented on Mar 17, 2022

@kittaakos
Contributor

as not blocking app startup while checking for updates

The IDE starts to await for the index-update in this commit: 9aff90b#diff-f463d1c276a9080ec522ead62c6dd596e5bf330b093b7d51b71738c9795d0fdaL60-R60.

Auto index-update CLI changes:

I did some measurements on the HEAD (using console.time):

No 3rd party URLs:

  1. app start:
root INFO $$$ update-index: 966.274ms
root INFO $$$ update-lib-index: 980.132ms
root INFO $$$ init-instance: 1.174s
root INFO $$$ all: 3.129s
  1. app start:
root INFO $$$ update-index: 954.208ms
root INFO $$$ update-lib-index: 896.597ms
root INFO $$$ init-instance: 948.474ms
root INFO $$$ all: 2.800s

My 3rd party URLs:

http://digistump.com/package_digistump_index.json,http://www.leonardomiliani.com/repository/package_leonardomiliani.com_index.json,https://ambasat.com/boards/package_ambasat-1.com_index.json,https://arduino.esp8266.com/stable/package_esp8266com_index.json,https://dl.espressif.com/dl/package_esp32_index.json,https://files.seeedstudio.com/arduino/package_seeeduino_boards_index.json,https://mcudude.github.io/MightyCore/package_MCUdude_MightyCore_index.json,https://rabidprototypes.com/arduino/package_rabidprototypes_index.json,https://raw.githubusercontent.com/Lauszus/Sanguino/master/package_lauszus_sanguino_index.json,https://resource.heltec.cn/download/package_CubeCell_index.json,https://resource.heltec.cn/download/package_heltec_esp32_index.json,https://resource.heltec.cn/download/package_heltec_esp8266_index.json
  1. app start (with rm -rf ~/Library/Arduino15/ && rm -rf ~/Documents/Arduino/libraries):
root INFO $$$ update-index: 8.020s
root INFO $$$ update-lib-index: 1.010s
root INFO $$$ init-instance: 2.332s
root INFO $$$ all: 11.362s
  1. app start (with rm -rf ~/Library/Arduino15/ && rm -rf ~/Documents/Arduino/libraries):
root INFO $$$ update-index: 9.953s
root INFO $$$ update-lib-index: 862.065ms
root INFO $$$ init-instance: 2.107s
root INFO $$$ all: 12.922s
  1. app start:
root INFO $$$ update-index: 8.702s
root INFO $$$ update-lib-index: 875.767ms
root INFO $$$ init-instance: 499.915ms
root INFO $$$ all: 10.078s
  1. app start:
root INFO $$$ update-index: 8.343s
root INFO $$$ update-lib-index: 904.521ms
root INFO $$$ init-instance: 642.374ms
root INFO $$$ all: 9.890s

(Note: the numbers do not necessarily add up, but all >= the sum of the sub-tasks.)

On my dev env, zero cores and libs are installed. Still, the core index update takes a long time and heavily depends on the 3rd party URLs config.

stodge

stodge commented on Mar 18, 2022

@stodge

It can take 60s+ to load on my laptop, and seems to take at least 30s before there's any visual indication that it's loading. Admittedly I have an HDD and not an SSD, but something like Visual Code doesn't have this problem. I'm on Windows 10 - is there a way to show startup logs?

per1234

per1234 commented on Mar 18, 2022

@per1234
Contributor

is there a way to show startup logs?

Hi @stodge. You should get everything of interest by starting the Arduino IDE from the command line.

I'll provide instructions for how you can do that and then share the output here:

  1. Start File Explorer (AKA "Windows Explorer").
  2. Open the Arduino IDE installation folder
    (usually C:\Program Files\Arduino IDE or C:\Users\<user name>\AppData\Local\Programs\Arduino IDE).
  3. In the folder listing of the Arduino IDE installation folder, hold the Shift key while clicking the right hand button on the mouse.
  4. From the context menu, click "Open PowerShell window here".
    PowerShell will now open with the current directory set to the Arduino IDE installation folder.
  5. Type & ".\Arduino IDE".
  6. Press the Enter key.
    Debug output should now be printed to the PowerShell window as the Arduino IDE starts (or fails to start).
  7. Wait for the Arduino IDE to finish starting, or failing to start.
  8. Switch back to the PowerShell window if the Arduino IDE window took the focus.
  9. Right click on the title bar of the PowerShell window.
    This will open a context menu.
  10. Select Edit > Select All from the context menu.
    This will select all the text in the PowerShell window.
  11. Press Ctrl+C.
    This will copy the contents of the PowerShell window to the clipboard.
  12. Paste (Ctrl+V) the output in a reply to this GitHub issue thread.

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

stodge

stodge commented on Mar 18, 2022

@stodge

Thanks. I ran the command as you suggested, and it did nothing for 5 minutes until I pressed RETURN in Power Shell. It still has the problem where you the splash logo sits over everything on the screen and you can't bring any other window on top of it. Will post the logs in a bit.

I started the IDE from the command line before you replied, but as a foreground process. Again, it didn't do anything for 5+{ minutes until I pressed return in PowerShell and both instances started at the same time.

I'll close both instances and restart. More later... Thanks.

18 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    Participants

    @stodge@ckuethe@kittaakos@fstasi@ubidefeo

    Issue actions

      Takes x 6 times to load in compare to the old IDE · Issue #876 · arduino/arduino-ide