Skip to content

Remove BoundingBox calculation during footprint table loading

Mark Roszko requested to merge mroszko/kicad:pcbnew-loading into master

When loading the thousands of footprints you may have in your library table. CalculateBoundingBox() is actually a very expensive call since its trying to be pretty accurate and taking every shape into account. This call appears to be redundant as selecting a footprint in the Footprint picker AND placing a footprint call CalculateBoundingBox again anyway.

This removes the explicit CalculateBoundingBox() call and guards a nested one in SetPosition that was being called too early anyway.

I see a 4x speed up under MSVC. 1min 20 seconds down to 34 seconds to load all libraries when loading the footprint picker.

Edited by Mark Roszko

Merge request reports