Anim: restrict keylist creation for NLA drawing code #119470

Merged
Christoph Lendenfeld merged 1 commits from ChrisLend/blender:nla_limit_keylist into main 2024-03-22 12:09:48 +01:00

When previewing an action in the NLA, the drawing code would
calculate the Keylist for the whole action regardless of what is shown.
This patch limits the keylist creation to only do it for the viewport range
increasing performance in the case when less than the whole action is visible.


Test file with 10.000 keys per channel.
Time it takes to run nla_action_draw_keyframes

- Before After
whole F-Curve visible 60ms 60ms
zoomed in 60ms 1.6ms

Test file used
https://download.blender.org/ftp/sybren/animation-rigging/heavy_mocap_test.blend

When previewing an action in the NLA, the drawing code would calculate the Keylist for the whole action regardless of what is shown. This patch limits the keylist creation to only do it for the viewport range increasing performance in the case when less than the whole action is visible. ------ Test file with 10.000 keys per channel. Time it takes to run `nla_action_draw_keyframes` | - | Before | After | | - | - | - | | whole F-Curve visible | 60ms | 60ms | | zoomed in | 60ms | 1.6ms | Test file used https://download.blender.org/ftp/sybren/animation-rigging/heavy_mocap_test.blend
Christoph Lendenfeld added the
Module
Animation & Rigging
label 2024-03-14 16:15:32 +01:00
Christoph Lendenfeld added 1 commit 2024-03-14 16:15:41 +01:00
Christoph Lendenfeld added this to the 4.2 LTS milestone 2024-03-14 16:21:28 +01:00
Member

Happy it will make the LTS version! Thank you

Happy it will make the LTS version! Thank you
Sybren A. Stüvel requested review from Sybren A. Stüvel 2024-03-22 11:47:56 +01:00
Sybren A. Stüvel approved these changes 2024-03-22 12:02:59 +01:00
Sybren A. Stüvel left a comment
Member

LGTM!

LGTM!
Christoph Lendenfeld merged commit 24b4461be3 into main 2024-03-22 12:09:48 +01:00
Christoph Lendenfeld deleted branch nla_limit_keylist 2024-03-22 12:09:51 +01:00
Sign in to join this conversation.
No reviewers
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#119470
No description provided.