diff options
author | Campbell Barton <campbell@blender.org> | 2022-08-18 08:40:49 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-08-18 08:55:45 +0300 |
commit | 0aaff9a07d3bdf8588cef15d502aeb4fdab22e5e (patch) | |
tree | 4315bb9a01e376be24c352ac28a551935d1922ef /source/blender/makesdna | |
parent | 7be1c8bbae76f49fed96a6b0ca0cf387e002d1a5 (diff) |
WM: optimize adding notifier duplication check
Use a GSet to check for duplicate notifiers, for certain Python scripts
checking for duplicate notifiers added considerable overhead.
This is an alternative to D15129 with fewer chances to existing logic.
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_windowmanager_types.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_windowmanager_types.h b/source/blender/makesdna/DNA_windowmanager_types.h index 116ea4821cb..2586e13da39 100644 --- a/source/blender/makesdna/DNA_windowmanager_types.h +++ b/source/blender/makesdna/DNA_windowmanager_types.h @@ -151,6 +151,11 @@ typedef struct wmWindowManager { /** Refresh/redraw #wmNotifier structs. */ ListBase notifier_queue; + /** + * For duplicate detection. + * \note keep in sync with `notifier_queue` adding/removing elements must also update this set. + */ + struct GSet *notifier_queue_set; /** Information and error reports. */ struct ReportList reports; |