diff options
author | Bastien Montagne <b.mont29@gmail.com> | 2019-11-22 14:26:36 +0300 |
---|---|---|
committer | Bastien Montagne <b.mont29@gmail.com> | 2019-11-22 14:26:36 +0300 |
commit | 2a38b857f7dc33150ff44ffda3366dbb197d5425 (patch) | |
tree | d5e634bf89b86a9d21ad692a1a6a1a42525e629f /source/blender/makesdna | |
parent | cfb7f508ce76b8dea83da555e67813c161a6869d (diff) |
LibOverride: Make diffing several times faster.
Diffing on undo steps is a critical performance point of override
system, although not required for override itself, it gives user
immediate feedback ove what is overridden.
Profiling showed that rna path text search over overrides operations was
by far the most costly thing here, so now using a runtime temp ghash
mapping for this search instead.
Seems to give at least 5 times speedup on big production rig.
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_ID.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h index f303f7720c3..fce68b11fe4 100644 --- a/source/blender/makesdna/DNA_ID.h +++ b/source/blender/makesdna/DNA_ID.h @@ -32,6 +32,7 @@ extern "C" { #endif struct FileData; +struct GHash; struct GPUTexture; struct ID; struct Library; @@ -206,6 +207,9 @@ typedef struct IDOverrideLibraryProperty { ListBase operations; } IDOverrideLibraryProperty; +/* We do not need a full struct for that currently, just a GHash. */ +typedef struct GHash IDOverrideLibraryRuntime; + /* Main container for all overriding data info of a data-block. */ typedef struct IDOverrideLibrary { /** Reference linked ID which this one overrides. */ @@ -220,6 +224,8 @@ typedef struct IDOverrideLibrary { /* Temp ID storing extra override data (used for differential operations only currently). * Always NULL outside of read/write context. */ struct ID *storage; + + IDOverrideLibraryRuntime *runtime; } IDOverrideLibrary; enum eOverrideLibrary_Flag { |