obs-studio icon indicating copy to clipboard operation
obs-studio copied to clipboard

UI: Massively improve hotkey search performance

Open derrod opened this issue 2 years ago • 0 comments

Description

This PR significantly improves search performance in the hotkey settings tab.

The original author had the right idea with disabling updates so the list would not be continuously updated/redrawn while the search loop is updating visibilities, but they set it on the wrong element. Disabling the layout instead improves things significantly with large scene collections.

Also includes some smaller optimisations to avoid some operations (toLower()/getting combinations) unless necessary which speeds up the loop a tiny bit.

Motivation and Context

Makes search usable with the example collection linked in #6081.

How Has This Been Tested?

Searched some hotkeys, no longer was afraid of dying of old age while it updates

Types of changes

  • Performance enhancement (non-breaking change which improves efficiency)

Checklist:

  • [x] My code has been run through clang-format.
  • [x] I have read the contributing document.
  • [x] My code is not on the master branch.
  • [x] The code has been tested.
  • [x] All commit messages are properly formatted and commits squashed where appropriate.
  • [x] I have included updates to all appropriate documentation.

derrod avatar Feb 12 '23 14:02 derrod