Fix #114828: Don't rebuild outliner tree when frame scrubbing #114845

Merged
Christoph Lendenfeld merged 2 commits from ChrisLend/blender:fix_outliner_tree_rebuilt into main 2023-12-05 11:04:35 +01:00

Before this PR, whenever the frame changed during scrubbing, the whole outliner tree would be rebuilt.
This rebuilding did not happen when playing back.
This was a major bottleneck, especially on scenes with many objects.

As far as I can tell there is no need to do that, since there is no function that changes the scene structure when the frame is changed.
The only way to do that is to add a python handler for post_frame_change, but that also fires when playing back.

The performance gains can be quite significant. I've made a scene with 32.000 cubes and the wm_draw_update function goes from
~60ms
to
~30ms

Before this PR, whenever the frame changed during scrubbing, the whole outliner tree would be rebuilt. This rebuilding did not happen when playing back. This was a major bottleneck, especially on scenes with many objects. As far as I can tell there is no need to do that, since there is no function that changes the scene structure when the frame is changed. The only way to do that is to add a python handler for `post_frame_change`, but that also fires when playing back. The performance gains can be quite significant. I've made a scene with 32.000 cubes and the `wm_draw_update` function goes from ~60ms to ~30ms
Christoph Lendenfeld added the
Module
User Interface
Interest
Animation & Rigging
labels 2023-11-14 15:39:24 +01:00
Christoph Lendenfeld added 1 commit 2023-11-14 15:39:40 +01:00
buildbot/vexp-code-patch-coordinator Build done. Details
35cc9687a6
don't rebuild outliner tree
Christoph Lendenfeld requested review from Nathan Vegdahl 2023-11-14 15:40:39 +01:00
Christoph Lendenfeld requested review from Sybren A. Stüvel 2023-11-14 15:40:39 +01:00
Christoph Lendenfeld requested review from Julian Eisel 2023-11-14 15:40:39 +01:00
First-time contributor

Is there a test build for this?

Is there a test build for this?
Author
Member

@sanek122005 good idea, will take a while though

@blender-bot package

edit: seems like the buildbot is offline atm. Will try again in a few hours

@sanek122005 good idea, will take a while though @blender-bot package edit: seems like the buildbot is offline atm. Will try again in a few hours
Member

Failed to start build, can't connect to buildbot.

Failed to start build, can't connect to buildbot.
Julian Eisel approved these changes 2023-11-14 19:10:16 +01:00
Julian Eisel left a comment
Member

I also don’t expect issues, so this LGTM. Even if there appears one, we can probably make the tagging a bit smarter (don’t rebuild on every frame change).

I also don’t expect issues, so this LGTM. Even if there appears one, we can probably make the tagging a bit smarter (don’t rebuild on every frame change).
Author
Member

@blender-bot package

@blender-bot package
Member

Package build started. Download here when ready.

Package build started. [Download here](https://builder.blender.org/download/patch/PR114845) when ready.
Christoph Lendenfeld added 1 commit 2023-11-16 11:23:09 +01:00
buildbot/vexp-code-patch-coordinator Build done. Details
226409d0c7
Merge branch 'main' into fix_outliner_tree_rebuilt
Author
Member

@blender-bot package windows

the windows build failed to compile on a file unrelated to this PR. Merged main to try again

@blender-bot package windows the windows build failed to compile on a file unrelated to this PR. Merged main to try again
Member

Package build started. Download here when ready.

Package build started. [Download here](https://builder.blender.org/download/patch/PR114845) when ready.
Author
Member

@blender-bot package windows

trying again, buildbot didn't start a windows build

@blender-bot package windows trying again, buildbot didn't start a windows build
Member

Package build started. Download here when ready.

Package build started. [Download here](https://builder.blender.org/download/patch/PR114845) when ready.
Nathan Vegdahl approved these changes 2023-11-20 16:01:13 +01:00
Nathan Vegdahl left a comment
Member

Looks good to me. I agree a rebuild shouldn't be needed here. And as you said even if a frame change does trigger something (e.g. via a handler) that would then require a rebuild, that itself should produce another signal that does trigger a rebuild.

Looks good to me. I agree a rebuild shouldn't be needed here. And as you said even if a frame change does trigger something (e.g. via a handler) that would then require a rebuild, that itself should produce another signal that does trigger a rebuild.
Sybren A. Stüvel approved these changes 2023-12-05 10:41:58 +01:00
Sybren A. Stüvel left a comment
Member

LGTM!

LGTM!
Christoph Lendenfeld merged commit b549260aa4 into main 2023-12-05 11:04:35 +01:00
Christoph Lendenfeld deleted branch fix_outliner_tree_rebuilt 2023-12-05 11:04:37 +01:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
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
EEVEE & Viewport
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
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
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
EEVEE & Viewport
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
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
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
6 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#114845
No description provided.