Animation: Refactor storage usage during fcurve modifier evaluation
authorJacques Lucke <mail@jlucke.com>
Wed, 17 Apr 2019 16:09:33 +0000 (18:09 +0200)
committerJacques Lucke <mail@jlucke.com>
Wed, 17 Apr 2019 16:09:33 +0000 (18:09 +0200)
commit81ce3801bf0a876b73b73817ca1a61b4e81b214d
treed9f749b8d494c68903b3f591434522c119177f7e
parent5f5a22970b4f7b3c42f73cf1f5a5dac4f32a14b0
Animation: Refactor storage usage during fcurve modifier evaluation

Previously, when a fcurve modifier used storage,
many heap allocations were done.
This caused major slowdowns as described in T63656.

Furthermore, the storage usage was a special case only
used by the Cycles modifier. This refactor makes
storage usage the "normal" case.
That reduces the overall complexity.

The storage is stack allocated now.

The framerate on the provided test scene went up from ~5 fps to ~16 fps.

Reviewers: angavrilov

Differential Revision: https://developer.blender.org/D4701
source/blender/blenkernel/BKE_fcurve.h
source/blender/blenkernel/intern/anim_sys.c
source/blender/blenkernel/intern/fcurve.c
source/blender/blenkernel/intern/fmodifier.c