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-04 16:44:09 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-03-04 19:10:43 +0300
commite5ab2b9c629edb172bc833f6862b736e543ba456 (patch)
treeeb3713fbb296b36c08c5b035b3c5a66292d285f3 /source/blender/makesdna/DNA_sdna_types.h
parent3730d16347a55ef7a819ea1234538d794e0821a3 (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.# Please enter the commit message for your changes. Lines starting Note, this was reverted recently because it caused T62181 Changes to DNA_sdna_patch_struct_member_nr were needed which caused issues loading old 2.8x files.
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..bf7a8193246 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). */
+ short *names_array_len;
/** Size of a pointer in bytes. */
int pointer_size;