diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-07-12 04:48:04 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-07-12 04:56:45 +0300 |
commit | 0b3183d13cdbdcb06317fd1dd9b04ccd93a767c1 (patch) | |
tree | 84cde74eaf3706116c94920ecc813b83a1346017 /source/blender/makesdna/DNA_sdna_types.h | |
parent | 7212ebd09f9720883581221be923ae5e97ff5d76 (diff) |
writefile: remove SDNA last-hit, optimize DNA reconstruct
- Move last-hit index out of SDNA struct
(allows for access by multiple threads).
- Replace O(n^2) search with hash lookup in DNA reconstruction.
Diffstat (limited to 'source/blender/makesdna/DNA_sdna_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_sdna_types.h | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/source/blender/makesdna/DNA_sdna_types.h b/source/blender/makesdna/DNA_sdna_types.h index 791aca77558..26ea5cd4e93 100644 --- a/source/blender/makesdna/DNA_sdna_types.h +++ b/source/blender/makesdna/DNA_sdna_types.h @@ -35,12 +35,12 @@ # # typedef struct SDNA { - const char *data; /* full copy of 'encoded' data */ + const char *data; /* full copy of 'encoded' data (when data_alloc is set, otherwise borrowed). */ int datalen; /* length of data */ bool data_alloc; int nr_names; /* total number of struct members */ - const char **names; /* struct member names */ + const char **names; /* struct member names */ int pointerlen; /* size of a pointer in bytes */ @@ -57,11 +57,6 @@ typedef struct SDNA { struct GHash *structs_map; /* ghash for faster lookups, * requires WITH_DNA_GHASH to be used for now */ - - /* wrong place for this really, its a simple - * cache for findstruct_nr. - */ - int lastfind; } SDNA; # |