Curious behaviour of pcbnew, I don't know since when it does that...
It happened that I just had a .kicad_pcb file lying in the home
directory. No project, only the board file. Opened it using "pcbnew
file.kicad_pcb" as usual. After the "Debug: Loading global footprint
table file: /home/lomarcan/.fp-lib-table" (which doesn't exist, anyway,
and IIRC isn't even enabled in cmake) it took forever; then started as
usual...
Further examination with strace shown that:
- It stats the .fp-lib-table
- Get the cwd (i.e. the home)
- Tries to find the corresponding .pro, the the .pro from the template
- Stats the /usr/share/kicad/modules
- Stats the *whole fscking home recursively* so it takes a long time
- Do an openat of /usr/share/kicad/modules and stats all the .mod inside
Is this something like ``looking under the board directory for
modules''? AFAIK the new module storage is something like directories
for libraries and files for modules (correct me if I'm wrong). I don't
know the design details so I don't know if a full recursion is the
correct algorithm to find stuff. My home at home has 300Kfiles, at work
there are 500K or so... the cache helps but anyway it doesn't seem
correct to me:P
I think that in this case pcbnew is trying to hard to be smart:P If that
is the case wouldn't be useful add a 'signature file' to a module
directory (something like .im_a_kicad_module_lib inside...) to prune the
search?'