Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-03-03 18:33:16 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-03-03 19:00:33 +0300
commit657205530cc680012734200a8babd6232be5ee92 (patch)
treec387937f2dc1e02a370b4274b77e5360ab755d85 /source/blender/makesdna/DNA_sdna_types.h
parent647c26c5ce77eb36ce37505bb8deaee2004f1f4c (diff)
DNA: optimize data reconstruction
Cache the result of DNA_elem_array_size which was being called for each element when reconstructing each struct. Also skip padding members during reconstruction. Gives ~18% overall speedup loading 10_010_A.anim.blend (r3154) from the spring project.
Diffstat (limited to 'source/blender/makesdna/DNA_sdna_types.h')
-rw-r--r--source/blender/makesdna/DNA_sdna_types.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_sdna_types.h b/source/blender/makesdna/DNA_sdna_types.h
index 5b57065dff3..2c02f6a6745 100644
--- a/source/blender/makesdna/DNA_sdna_types.h
+++ b/source/blender/makesdna/DNA_sdna_types.h
@@ -38,6 +38,8 @@ typedef struct SDNA {
int nr_names, nr_names_alloc;
/** Struct member names. */
const char **names;
+ /** Result of #DNA_elem_array_size (aligned with #names). */
+ const short *names_array_len;
/** Size of a pointer in bytes. */
int pointer_size;