Skip to content
Snippets Groups Projects

Remove BoundingBox calculation during footprint table loading

Merged 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

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading