Skip to content

CommandPalette|ActionsExtraData: some more attempted optimisations

Daniel Boles requested to merge dboles/inkscape:djb_CommandPalette_speed into master
commit c9098f0bbee8dea59976da057738839c7b71cb88 (HEAD -> djb_CommandPalette_speed)
Author: Daniel Boles <dboles.src+inkscape@gmail.com>
Date:   Thu Aug 17 16:44:02 2023 +0100

    CommandPalette: some more attempted optimisations:
    
    * ActionExtraData can be const now, so make it so.
    * Avoid an extra ustring copy to get each section.
    * Don't call get_text() over & over on same Label.
    * Comment out calls to commented-out *color() fns.
    * Move test assert()s to ctor, not in on_sort()..!
    * gtk-builder-tool simplify UI file. rm dummy text
    * Remove unused, wrong-looking CSS class @ main UI

commit 99b872b19f6a2f9d223bfee092488222e5b76339
Author: Daniel Boles <dboles.src+inkscape@gmail.com>
Date:   Thu Aug 17 15:49:06 2023 +0100

    actions-extra-data: const-correctness & speed-ups
    
    Make the getter functions usable on const instances.
    
    Switch to unordered_map because most sources agree it's going to be
    faster for lookups than the sorted map. Reserve when adding elements.

Merge request reports