Description
Hi, I realized that also the code that builds the examples of the libraries, may have a problem. If the library has large documentation (docs) like generated by doxygen, or some other directory with many files, the IDE will take a long time to scan.
My first idea was to ignore the known files ... as is done with .svn and .git ... but I ended up identifying that it is better to do this treatment below:
Arduino/app/src/processing/app/Base.java
Lines 1779 to 1781 in 02a2e22
to this:
To only focus on the folder of interest.
private boolean addSketchesSubmenu(JMenu menu, UserLibrary lib) {
File examples = new File(lib.getInstalledFolder(), "examples");
JMenu submenu = new JMenu(lib.getName());
boolean found = addSketches(submenu, examples);
if (found) {
menu.add(submenu);
MenuScroller.setScrollerFor(submenu);
}
return found;
}
In my case I had a node_modules folder (don't ask me why ... lol) it took about 5s to read it
total time was around 11s, because i had another library with a big docs folder.
PS: Sorry for opening several separate problems, but it is for us to track the errors I found. As it is part of an ongoing refactoring, in order to solve part of the same "slow startup" problem, it is difficult to make several separate pull requests.