Projucer module hunting behaviour


#1

If you have a module which is not inside a subfolder, such as

/Users/jim/jims_cool_module/…

The jucer takes a VERY long time to load, and hangs a lot. Presumably it’s searching my entire home folder for other modules?

It then also finds all the possible JUCE downloads ever from my home directly and the right click ‘add module’ menu becomes full of duplicates.

Presumably it could stop searching just one layer deep and stop trying to navigate my whole home folder or whatever it is doing??


#2

Hi Jim, thanks for reporting this. Just to double-check, that’s the observable symptom you mean right?

The responsible piece of code is here:

You are right, the function addAllModulesInFolder calls itself recursively following the directory structure on disk. This may very well cause the long delays your mention. We will see what we can do about it.


#3

Exactly that. Thanks! It can lock up for 5 minutes if you put a module in the right place :slight_smile:


#4

Actually - if you are looking at this - and were feeling daring - then the module stuff could use an overhaul! Setting paths for modules is much harder than it ought to be once you’ve got non-juce modules involved.

How about we just specify module search paths, globally and with per-project overrides. Just like include paths are set.

Then in addition, in that drop down menu also show the path where the module was found, and for bonus points the module version.

Then things like ‘copy paths to all modules’, which is horrible, would be a thing of the past :slight_smile:


#5

[…] Presumably it could stop searching just one layer deep and stop trying to navigate my whole home folder or whatever it is doing??

Fixed on develop https://github.com/julianstorer/JUCE/commit/8f1d37a72ec9830c44b94a50198177edc4cf60f6

How about we just specify module search paths, globally and with per-project overrides. Just like include paths are set.

Then in addition, in that drop down menu also show the path where the module was found, and for bonus points the module version.

Then things like ‘copy paths to all modules’, which is horrible, would be a thing of the past :slight_smile:

I’d certainly prefer that too, but it’s a conceptual change that we cannot do on-the-fly. However, we can file it as a proposal for discussion! (added it to the backlog)


#6

Thanks Stefan.