diff options
author | Jacques Lucke <jacques@blender.org> | 2020-09-29 13:29:01 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-09-29 13:29:01 +0300 |
commit | 6374644fd11797806ab2e92341e5e7d32e94067b (patch) | |
tree | 5126cb4de4e7ffd23632b57793751e15f1b89e32 /source/blender/ikplugin/intern | |
parent | b41fb5542a72d8277342fead39bc0249e7306fb1 (diff) |
DNA: optimize struct reconstruction by doing some preprocessing
When loading large files that are more than a couple weeks old
(such that DNA has changed in that time), a significant amount of
time is spent in `DNA_struct_reconstruct`. This function takes a struct
in the old layout and creates a struct in the new layout from it.
This was slow because it was computing the diff between the struct
layouts every time a struct is updated. Now the steps for the struct
reconstruction is computed only once per struct. This information is
then used to actually reconstruct all structs that changed.
I measured about 10-20% speedup when loading Spring files.
E.g. `10.6s -> 8.7s` for `06_055_A.anim.blend` in BKE_blendfile_read`.
This percentage varies a lot based on the number of blocks that have
to be reconstructed and how much DNA has changed since they have
been written. In none of my tests was the new code slower than the
old code.
Reviewers: campbellbarton
Differential Revision: https://developer.blender.org/D8959
Diffstat (limited to 'source/blender/ikplugin/intern')
0 files changed, 0 insertions, 0 deletions