From d4dec1c3bcc8fa85e8f4cf3372efe077648a67bf Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 20 Aug 2011 14:23:43 +0000 Subject: use ghash for DNA_struct_find_nr(), gives ~18% speedup on loading sintel lite, will also speedup undo. note: only works with CMake, wasn't able to get this working with scons, complains about same file being built in different environments. --- source/blender/makesdna/DNA_sdna_types.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source/blender/makesdna/DNA_sdna_types.h') diff --git a/source/blender/makesdna/DNA_sdna_types.h b/source/blender/makesdna/DNA_sdna_types.h index e5f924b5fa6..829d1eee03b 100644 --- a/source/blender/makesdna/DNA_sdna_types.h +++ b/source/blender/makesdna/DNA_sdna_types.h @@ -54,7 +54,10 @@ typedef struct SDNA { (sp[2], sp[3]), (sp[4], sp[5]), .. are the member type and name numbers respectively */ - + + 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. */ -- cgit v1.2.3