← Back to team overview

kicad-developers team mailing list archive

[PATCH] Use vector instead of bitset for VIEW_ITEM_DATA layer storage

 

I have been working on https://bugs.launchpad.net/kicad/+bug/1745203
looking for ways to squeeze performance out of rendering large numbers of
items on the GAL canvas.

The attached patch is the first "low-risk" change I have found.  This
change results in a 10-15% speedup in operations (file load, show/hide
d-codes, etc) on MacOS.  The change is somewhat less dramatic on Linux, and
I have not tested it on Windows.

The rationale for the change is that iterating over a std::bitset is
somewhat costly, and most items don't exist on that many layers, so I am
trading time for memory but I don't see it as a large memory cost.

-Jon

Attachment: 0001-Use-vector-instead-of-bitset-for-VIEW_ITEM_DATA-laye.patch
Description: Binary data


Follow ups