Skip to content

KConfigGroup::keyList(): use dedicated implementation, avoiding unused map

Reusing KConfigGroup::entryMap() came with the price paid for generating a complete map including new deep QString instances for all the entries. Just to discard all the entries and the map structure and create a new list structure, only reusing the key strings.

The extended benchmark showed for a group with a single entry a reduction of ~ 35 %, which improves more with more entries (e.g. 3 -> ~40 %).

https://lxr.kde.org/search?v=kf6-qt6&_advanced=&_filestring=&_string=keyList%5C%28%5C%29&_casesensitive=1 shows there are quite a number of consumers of that API, so pimping execution seems worth the extra code.

Merge request reports