Font other than KiCad Font causes lag in Schematic Editor canvas
Description
Setting the default font to anything except KiCad Font causes significant interaction lag with the Schematic Editor when the open schematic has many text items that are set to use the default. This is most obvious when undoing/redoing, where KiCad freezes long enough to trigger the spinning beachball of death briefly.
I originally thought this was a project specific issue, but now I believe that the attached project is just an extreme example of an underlying slowdown.
Steps to reproduce
- Open BLBSC in Project Manager
- Open KiCad > Preferences > Schematic Editor > Display Options
- For Default Font, select anything other than KiCad Font
- Open BLBSC schematic in Schematic Editor
- Zoom in and out, pan around to see lag
- Add a text item with Default Font
- Undo, see a long wait that might include the spinning beachball
- In Preferences, Set Default Font to KiCad Font
- In Schematic Editor, see all interactions speed up massively
It is also possible to notice this by starting with a blank project and adding many text boxes set to any font other than KiCad Font. If you add about 50 text boxes you start to see a slowdown in interactions. At that point undoing will also noticeably slow down.
KiCad Version
Application: KiCad Schematic Editor x86_64 on x86_64
Version: 7.0.1-0, release build
Libraries:
wxWidgets 3.2.2
FreeType 2.12.1
HarfBuzz 5.3.1
FontConfig 2.14.0
Platform: macOS Ventura Version 13.2.1 (Build 22D68), 64 bit, Little endian, wxMac
wxWidgets: 3.2.2 (wchar_t,wx containers)
Boost: 1.80.0
OCC: 7.6.3
Curl: 7.77.0
ngspice: 38
Compiler: Clang 13.0.0 with C++ ABI 1002
Build settings:
KICAD_SPICE=ON