KiCad freezes for > 10s during first "forward annotation" from schematic to PCB

I am on current stable, i.e. Kicad V9.0.1 on Windows 10/11 although I have also seen this already in V9.0.0.

I have a simple, one-pager schematic and associated layout. The first time I hit F8 in schematic, (i.e. Tools->Update PCB from schematic) Kicad freezes for at least 10s, sometimes 20-30s before the dialog appears. If I keep open the project and do the same step a second time, the behaviour is “normal”/fast again. This was/is not the case in V8.0.9 so It is definitely not caused by a need to load lots of data, especially not with a simple board like the one I tested.

Not sure if there is already an issue open for that exact behaviour. Also It seems that sometimes, after a restart of Kicad, this behaviour is gone and the dialog appears immediately. Have to check how reboots affect the behaviour. Has anyone else seen this?

//EDIT: Full version info
Application: KiCad x64 on x64

Version: 9.0.1, release build

Libraries:
wxWidgets 3.2.6
FreeType 2.13.3
HarfBuzz 10.2.0
FontConfig 2.15.0
libcurl/8.11.1-DEV Schannel zlib/1.3.1

Platform: Windows 10 (build 19045), 64-bit edition, 64 bit, Little endian, wxMSW
OpenGL: ATI Technologies Inc., AMD Radeon™ Graphics, 4.6.0 Compatibility Profile Context 22.20.27.09.230330

Build Info:
Date: Mar 30 2025 01:11:30
wxWidgets: 3.2.6 (wchar_t,wx containers)
Boost: 1.86.0
OCC: 7.8.1
Curl: 8.11.1-DEV
ngspice: 44
Compiler: Visual C++ 1942 without C++ ABI
KICAD_IPC_API=ON

Locale:
Lang: en_AT
Enc: UTF-8
Num: 1.234,5
Encoded кΩ丈: D0BACEA9E4B888 (sys), D0BACEA9E4B888 (utf8)

Can you post the project that is causing this?

This was/is not the case in V8.0.9 so It is definitely not caused by a need to load lots of data

It could be that kicad has to load the footprint libraries a first time.

Please try:

  • first open the footprint editor (or the footprint chooser)
  • only then execute the “update pcb from schematic” command

Observe if you encounter the “10 seconds delay” also in this order of operation.

Attaching the project (as James wrote) could also help to reproduce the issue.

Your conclusion that “definitely…” may not be true.
When I run KiCad previous versions (I’m not sure if I have done it with V8 at least once) with KiCad library list (normally I use my library lists) it always spend long time at the beginning on loading libraries. May be in V9 (I didn’t installed it yet) the library loading at beginning were delayed to the time when they will be needed.

Ok, @mf_ibfeew : you are right - seems that was the delay. If I as you suggested before open the footprint editor and wait until it has loaded, then there is actually no delay when hitting F8. I am sorry, was not aware of that change.

I guess it makes sense to delay the loading until used, but maybe some small “splash” box that informs about loading would be useful? (I am using KiCad in an education environment and I am sure that a lot of people will try to click adround during the time nothing happens, possibly provoking issues =) )

Thank you all for replying!

1 Like

We’d actually like to get background loading of the libraries implemented, but there is quite a bit of complexity there to do it correctly for historical reasons.

1 Like

If in V9 (I’m not using it yet) you load library when F8 is hit than may be load only libraries used.

Unfortunately that would also be very hard to do currently.

As I mentioned: I observed students working with KiCad to start clicking around in that time of loading (sometimes leading to program crahes or totally freezing so that Windows says “the program is not responding” and wants to close it) because It is not clear to the user that there is something loadded in the background

I expected that there is no easy solution because at some point you have to load the libs, but yeah maybe just loading what is really needed would reduce the time for many smaller designs drastically (in school we have very simple schematics that all fit onto one page :wink: )

I understand the ask - but to restate, it would not be simple to implement. The library loading is quite a complex beast. The true solution will be background loading of libraries.

maybe just loading what is really needed would reduce the time for many smaller designs drastically

For your usecase it would help to cleanup the kicad footprint libraries.
Disabling potentially unused libraries in the “Preferences–>Manage footprint libraries” dialog would reduce the library loading time.

I have done this optimization also on my own system and reduced the loading time by half.
In my case I have disabled all libraries:

  • with unused connector / terminal block vendors
  • all RF-and modules libraries
  • some of the complicated package footprints (BGA/LGA)

If you have a clear defined set of designing problems I would gues that ~10 FP libraries would be enough, plus some additional libraries to disturb the students.

1 Like

When I decided to move to KiCad I have started from making my own libraries. My first KiCad schematic was using only symbols from my libraries and first PCB had only my footprints. This protects you against any changes in library that can happen with KiCad version change and reduces time KiCad spend on libraries to not noticeable for user.

If I were teaching KiCad I would certainly start from making user libraries and then reduced the library list to only ‘my libraries’. All KiCad users should know how to manage your own libraries - why not start from it.

Only 20-30 seconds? For me it often takes much more than a minute. This is especially annoying because my use tends to be quick testing for the sake of this forum using nightly builds or something like that instead of actual pcb design, and reloading all libraries happens quite often. I just have given up and find some diversion while it loads.

That sounds very slow. I generally only run debug builds, which are slower than our release builds as they are not optimised, and it only takes a few seconds to load all the libraries. That is off a fast SSD though - are your libs on a slow network drive?

I never thought of this so I’m going to give it a try, my load times are about 2-3 minutes :rage:
:mouse: