Skip to content

Version 1.8.2 three times slower to launch #6350

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
technoblogy opened this issue Jun 5, 2017 · 17 comments
Closed

Version 1.8.2 three times slower to launch #6350

technoblogy opened this issue Jun 5, 2017 · 17 comments
Labels
IDE 1.9.x Beta Related to the Arduino IDE Beta Build
Milestone

Comments

@technoblogy
Copy link

I've been comparing the time to launch 1.6.8, 1.8.1, and 1.8.2 on a MacBook Pro (Mac OS X 10.11.6).

Both 1.6.8 and 1.8.1 take 4 seconds, but 1.8.2 takes 13 seconds, over three times slower.

Any suggestions why this might be?

@PaulStoffregen
Copy link
Contributor

Maybe the newer JRE?

@gilbertoverg
Copy link

I have the same issue, for me the launch time for 1.8.2 and 1.8.3 is 27 seconds

@bperrybap
Copy link

bperrybap commented Jun 8, 2017

Some of the problem (maybe most of it) is due to something in the IDE that ends up scanning the users sketchbook libraries and cores multiple times. It does this on startup or any time you switch cores.
I don't understand why multiple scans would ever be necessary.

This has existed for many years but seems to have gotten worse recently.
It gets particularly slow when your sketchbook directory is across a network mount.

In the past it was very obvious for me as certain IDEs had some foolish naming restrictions on library directory names and I would have to answer the same prompt for a given library directory name up to 9 times for each directory it didn't like on startup or whenever I switched cores.
i.e. I'd get a slew warnings for directory names it didn't like - each of which must be individually acknowledged, and then this same sequence would repeat over and over again until the IDE finally started.
It was a total pain.
The new IDEs no longer have the restrictions on directory names and hence don't toss up the warnings that you must acknowledge but they seem to still do the multiple scans of the users sketchbook libraries.

@gilbertoverg
Copy link

@bperrybap I agree with you, I can see Arduino scanning libraries during startup with:
sudo fs_usage pid <Arduino pid>

@technoblogy
Copy link
Author

Thank you for confirming that I'm not the only one who has found this. I definitely think it would be worth the developers spending a bit of time to fix this.

@cmaglie
Copy link
Member

cmaglie commented Jun 14, 2017

The multiple scanning of the libraries can be surely optimized, but it has been like this well before 1.8.1, IMHO the cause of the slow down should be searched elsewhere.

@bengtmartensson
Copy link

I have found that "phony" serial ports (e.g. Bluetooth virtual such) can be startup time culprit. Can this be an issue here?

@f3rland
Copy link

f3rland commented Jun 20, 2017

Thanks for pointing that out @bengtmartensson
I had multiple "VirtualBox Host-Only Ethernet Adapter #x" created by Virtual box/Vagrant and Arduino IDE (1.8.2) took nearly 1 minute to load before I removed all of those adapter. Now 3 seconds top.

facchinm added a commit to facchinm/Arduino that referenced this issue Jun 23, 2017
Scanning libraries is an heavy task if the sketchbook becomes huge;
This patch targets two points:

- remove the rescan() after setLibrariesFolders(), which already performs a rescan
- call setLibrariesFolders() only when the folder list has changed
  - This ensures that no scan is performed when changing board in the same architecture

Could mitigate arduino#6350
facchinm added a commit to facchinm/Arduino that referenced this issue Jun 26, 2017
Scanning libraries is an heavy task if the sketchbook becomes huge;
This patch targets two points:

- remove the rescan() after setLibrariesFolders(), which already performs a rescan
- call setLibrariesFolders() only when the folder list has changed
  - This ensures that no scan is performed when changing board in the same architecture

Could mitigate arduino#6350
@gilbertoverg
Copy link

I've tried the test build from #6419 but it still takes 35 seconds to launch

@Googliola
Copy link

Issue still present in 1.8.4

facchinm added a commit that referenced this issue Oct 11, 2017
Scanning libraries is an heavy task if the sketchbook becomes huge;
This patch targets two points:

- remove the rescan() after setLibrariesFolders(), which already performs a rescan
- call setLibrariesFolders() only when the folder list has changed
  - This ensures that no scan is performed when changing board in the same architecture

Could mitigate #6350
facchinm added a commit that referenced this issue Oct 11, 2017
Fixes #6350 (the regression was introduced with b2241da )
Thanks git-bisect :)
facchinm added a commit that referenced this issue Oct 16, 2017
Scanning libraries is an heavy task if the sketchbook becomes huge;
This patch targets two points:

- remove the rescan() after setLibrariesFolders(), which already performs a rescan
- call setLibrariesFolders() only when the folder list has changed
  - This ensures that no scan is performed when changing board in the same architecture

Could mitigate #6350
facchinm added a commit that referenced this issue Oct 16, 2017
Fixes #6350 (the regression was introduced with b2241da )
Thanks git-bisect :)
facchinm added a commit to facchinm/Arduino that referenced this issue Oct 18, 2017
Fixes arduino#6350 (the regression was introduced with b2241da )
Thanks git-bisect :)
cmaglie pushed a commit that referenced this issue Oct 23, 2017
Scanning libraries is an heavy task if the sketchbook becomes huge;
This patch targets two points:

- remove the rescan() after setLibrariesFolders(), which already performs a rescan
- call setLibrariesFolders() only when the folder list has changed
  - This ensures that no scan is performed when changing board in the same architecture

Could mitigate #6350
cmaglie pushed a commit that referenced this issue Oct 23, 2017
Fixes #6350 (the regression was introduced with b2241da )
Thanks git-bisect :)
cmaglie pushed a commit that referenced this issue Oct 30, 2017
Scanning libraries is an heavy task if the sketchbook becomes huge;
This patch targets two points:

- remove the rescan() after setLibrariesFolders(), which already performs a rescan
- call setLibrariesFolders() only when the folder list has changed
  - This ensures that no scan is performed when changing board in the same architecture

Could mitigate #6350
cmaglie pushed a commit that referenced this issue Oct 30, 2017
Fixes #6350 (the regression was introduced with b2241da )
Thanks git-bisect :)
@jaygarcia
Copy link

Want to confirm that this is still present in 1.8.5. =)

@facchinm
Copy link
Member

facchinm commented Nov 3, 2017

@jaygarcia could you test 1.9.0 beta? It should contain an additional fix (5c61508) that should solve the issue. Thansk!

@gilbertoverg
Copy link

1.9.0 beta solves the issue for me

@technoblogy
Copy link
Author

I confirm that 1.9.0 beta launches in 4 seconds, matching the behaviour of 1.6.8 and 1.8.1. That's great news - a big thank you to everyone who worked to achieve this!

facchinm added a commit that referenced this issue Nov 10, 2017
Scanning libraries is an heavy task if the sketchbook becomes huge;
This patch targets two points:

- remove the rescan() after setLibrariesFolders(), which already performs a rescan
- call setLibrariesFolders() only when the folder list has changed
  - This ensures that no scan is performed when changing board in the same architecture

Could mitigate #6350
facchinm added a commit that referenced this issue Nov 10, 2017
Fixes #6350 (the regression was introduced with b2241da )
Thanks git-bisect :)
facchinm added a commit that referenced this issue Nov 15, 2017
Scanning libraries is an heavy task if the sketchbook becomes huge;
This patch targets two points:

- remove the rescan() after setLibrariesFolders(), which already performs a rescan
- call setLibrariesFolders() only when the folder list has changed
  - This ensures that no scan is performed when changing board in the same architecture

Could mitigate #6350
facchinm added a commit that referenced this issue Nov 15, 2017
Fixes #6350 (the regression was introduced with b2241da )
Thanks git-bisect :)
@SuperTango
Copy link

@jaygarcia dunno if this still matters, but I see this problem in 1.8.5.

@jaygarcia
Copy link

@SuperTango this seems to be fixed in 1.9 beta: https://www.arduino.cc/en/Main/Software#beta

This ticket can most likely be closed once 1.9 is released to prod.

Fantastic work everyone and thank you so much for fixing this! <3

@jaygarcia
Copy link

/cc @facchinm

facchinm added a commit that referenced this issue Jan 11, 2018
Scanning libraries is an heavy task if the sketchbook becomes huge;
This patch targets two points:

- remove the rescan() after setLibrariesFolders(), which already performs a rescan
- call setLibrariesFolders() only when the folder list has changed
  - This ensures that no scan is performed when changing board in the same architecture

Could mitigate #6350
facchinm added a commit that referenced this issue Jan 11, 2018
Fixes #6350 (the regression was introduced with b2241da )
Thanks git-bisect :)
facchinm added a commit to facchinm/Arduino that referenced this issue Jan 22, 2018
Fixes arduino#6350 (the regression was introduced with b2241da )
Thanks git-bisect :)
cmaglie pushed a commit to facchinm/Arduino that referenced this issue Feb 2, 2018
Scanning libraries is an heavy task if the sketchbook becomes huge;
This patch targets two points:

- remove the rescan() after setLibrariesFolders(), which already performs a rescan
- call setLibrariesFolders() only when the folder list has changed
  - This ensures that no scan is performed when changing board in the same architecture

Could mitigate arduino#6350
facchinm added a commit that referenced this issue Feb 16, 2018
Scanning libraries is an heavy task if the sketchbook becomes huge;
This patch targets two points:

- remove the rescan() after setLibrariesFolders(), which already performs a rescan
- call setLibrariesFolders() only when the folder list has changed
  - This ensures that no scan is performed when changing board in the same architecture

Could mitigate #6350
facchinm added a commit that referenced this issue Feb 16, 2018
Fixes #6350 (the regression was introduced with b2241da )
Thanks git-bisect :)
@facchinm facchinm added the IDE 1.9.x Beta Related to the Arduino IDE Beta Build label Apr 11, 2018
facchinm added a commit that referenced this issue Apr 12, 2018
Scanning libraries is an heavy task if the sketchbook becomes huge;
This patch targets two points:

- remove the rescan() after setLibrariesFolders(), which already performs a rescan
- call setLibrariesFolders() only when the folder list has changed
  - This ensures that no scan is performed when changing board in the same architecture

Could mitigate #6350
facchinm added a commit that referenced this issue Apr 12, 2018
Fixes #6350 (the regression was introduced with b2241da )
Thanks git-bisect :)
facchinm added a commit that referenced this issue May 2, 2018
Scanning libraries is an heavy task if the sketchbook becomes huge;
This patch targets two points:

- remove the rescan() after setLibrariesFolders(), which already performs a rescan
- call setLibrariesFolders() only when the folder list has changed
  - This ensures that no scan is performed when changing board in the same architecture

Could mitigate #6350
@cmaglie cmaglie modified the milestones: Next, Release 1.8.6 May 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IDE 1.9.x Beta Related to the Arduino IDE Beta Build
Projects
None yet
Development

No branches or pull requests