Speeding-Up Footprint Loading

Kicad 5.1.7

Loading Footprints was always slow on my Mac with SSD, 32G-RAM…

I cleaned out all the Footprints/etc - stuff that I’d never use and Un-checked other items in the Path. It didn’t help much.

As I pared_down the number of footprint Folders (I have a dozen custom one’s), I discovered the one for loading Github keept auto-restoring. I don’t want Github (period!) so, I jimmied-up a little ‘Trick’…

I created a ‘Null’ folder and set the Github Path to point to it. BINGO All my Footprints load Immediately :smile:

Previously took 37 seconds to load, Now, it’s less than 1 second

EDIT - Shame on me, I should’ve included the following…
One important thing to make Speeding Up footprint loading a Success and, it should be done in user locations to make it work across Creating New Projects in Kicad Main Panel and from Templates.

It’s simple enough to figure “it” out by observation of folder contents so, I’ll leave it to users to solve that. But, once done, starting/editing New Projects, New Footprints, PCB, Schematics (and opening existing ones) is fast… Tip/Hint: After doing “it”, Quit Kicad so the magic happens…

Video example from after computer reboot (just to ensure no open linkage/threads) shows Starting Kicad, Footprint Editor, PCB and Eeschema
without any delay

2 Likes

I just did what you describe: I created a dummy folder, and pointed to it: Wow! Almost instant load!

1 Like

Excellent! Be sure to also do the extra steps (re observation of files, as I mentioned) or, the speed won’t be propagated to New projects… And, when you consider that, do it for any of your custom Template folders… thus, won’t need to do it for individual new projects…

Thank you, @BlackCoffee, for letting us know about this trick. I found the dialog box to modify KICAD_USER_TEMPLATE_DIR and KIGITHUB. So I will try your trick as soon as I assign footprints to the amplifiier schematic I am now working on, using kicad 5.1.8. I don’t currently have any custom footprint libaries. For the two transistors that don’t appear in the default kicad library/libraries, I can just a plain vanilla TO_2220 footprint

If it thinks you have a “real” github folder then it knows it can’t cache the footprint descriptions and so takes much longer to load.

However, if you don’t have any libraries in your table that use ${KIGITHUB}, then it should be using the cache already. Perhaps you had some old libraries (from back in the day when people actually used github libraries)?

I’m having issues with slow loading but weirdly enough 5.1.8 loads instantly but 5.99 takes 20-30s. And nightly doesn’t even have github plugin anymore.
Both versions have the same footprint lib table. Any ideas why?

I’ve seen corrupt caches get saved. Check to see if your fp-info-cache file is zero length.

No, it’s not empty. I even renamed it, let kicad recreate it but on subsequent start it’s still slow to load footprints.

I’m afraid I’ve got nothing then…

Any pointers how I can debug this? I compile it myself, I can try to dig in the sources.
But I’m on win, using msys2, gdb is very hard to use.

Also https://gitlab.com/kicad/code/kicad/-/issues/4908.

That is a slightly different issue about growth of symbol libs taking more and more time to load.
My issue is that footprint cache is not working.

Edit: @JeffYoung I found what my issue was: https://gitlab.com/kicad/code/kicad/-/merge_requests/566

1 Like

Thanks for the MR. This was my fault when I fixed the fp cache not loading in pcbnew all the time.

In regards to symbols, I’ve been so tempted to a create a symbol-info-cache for that though at first I need to give the fp-info-cache global state some loving

1 Like

Regarding Templates and Speeding Up Footprints…

Good applicable comments from others. For my needs, what I detailed works for me on my well-hacked-custom OSX system and Kicad 5.1.7.

I’ve repeated testing this out many times now in past few days, from re-booting machine to starting new projects, opening old project…etc. It consistently works well for me…

So, from my perspective, given that I start new projects using my Custom Templates (they have the ‘Meat’ of what I detailed), Footprint loading happens in the blink of an eye.

If starting a new project without using a template, I’ll expect needing to take a few sips of coffee while footprint loads. But, to underscore, if using Templates that already have the ‘meat’ done, …blink, footprints are loaded.

So, how to make a Custom Template - I posted this a while back, before I discovered the trick so, some of the images I posted may not reflect the magic.

Below images show example of an updated Custom Template Folder and it’s presentation in the Template Selector Panel.

(Note: Magic doesn’t happen if starting a new project not using a file with the magic’s meat…

1 Like

For Windows users, Sysimternals is my goto for tracing slow file access problems