diff options
author | Bastien Montagne <bastien@blender.org> | 2022-06-09 15:58:35 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2022-06-09 16:17:20 +0300 |
commit | 14d1ad8dd8380dab783e6517c437a90cbf73c398 (patch) | |
tree | 95300594d4c2276cca1d635eaf633a37ed3c078b /source/blender/blenkernel/BKE_studiolight.h | |
parent | 6d726192be73856542dec010d149931bc806e045 (diff) |
FCurve: optimize search from an RNA path + index.
By checking the index value first instead of a full fledge string
comparision in `BKE_fcurve_find`, we can make that code significatly
faster (from about 10% in a Heist production file to over 45% in a
heavily animated test file).
While this code was already very fast (a few microseconds per call
typically), it gets called a lot from the UI (several hundreds of time
per refresh), among other things.
NOTE: the `UNLIKELY` hint is responsible for 25% to 30% of the
speed improvement.
Diffstat (limited to 'source/blender/blenkernel/BKE_studiolight.h')
0 files changed, 0 insertions, 0 deletions