Poor redo panel performance when using a big asset library #120494
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
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
7 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#120494
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating system: macOS-14.4-arm64-arm-64bit 64 Bits
Graphics card: Metal API Apple M1 Max 1.2
Blender Version
Broken: version: 4.1.1 Release Candidate, branch: blender-v4.1-release, commit date: 2024-04-09 15:11, hash:
917159affcf8
Was also broken in 4.0 and 4.1
Worked: 3.6
Short description of error
When using an asset library with a lot of assets in it (over 15k meshes and materials in total) it becomes noticably slow to change values in the redo panel, see a video here
Exact steps for others to reproduce the error
Since I can't really share my 50GB asset library here I don't know how to make it easy to reproduce, but I suppose one could try creating a blend file with 20000 suzannes in it and mark those as assets? It's possible that the asset library gets refreshed on redo or something like that (the asset library panel doesn't need to be opened for this bug to happen)
Thanks for the report. A few clarification questions:
Hi, thanks for the report. Thought this was fixed already with #115372. Maybe not entirely resolved yet.
Since this is a bit tricky to set up, I quickly hacked together a python and bash script to make this a bit easier.
Preferences
>File Paths
>Asset Libraries
. E.g./home/test_library/
namedTest Library
.create_assets.py
and ascript.sh
file.blender_exec
e.g.path/to/blender
and change the number of files and number of asset you want to create. 500 assets take around 15 seconds to create on my mashine, so that's around 12.5 minutes to run it for 50 blend files.bash script.sh
to create the whole test asset library.create_assets.py
:script.sh
:With a 2.5 GB asset library, I can't notice any slowdowns in the viewport, but I can see blender spending a lot of time in
ed::geometry::ui_template_node_operator_asset_root_items
(14% of samples) @HooglyBoogly :Steps to reproduce:
General
template.Cube
, select the top face and extrude it.Didn't get a chance to test yet, but I'm guessing the problem is that it's trying to search for node tools because it didn't find any. The solution probably looks like this:
Either way though, the stuff in that profile is probably worth optimizing, since asset libraries will only continue to grow in the future. In particular it's absurd how much time is spent checking if a file is hidden.
Is this something that could be backported to the upcoming Blender 4.1.1 as well...?
I'll look at the cost of
is_hidden_dot_filename
function itself.I didn't mean for
52cff75ce0
to automatically close this, but I'm pretty confident that will be the solution so I'll leave it like that for now. @passivestar, could you test the next daily build to check if it fixes the issue for you? If so, the commit is simple and can be backported to 4.1.Optimizing this is still worth it anyway, because this data still has to be calculated when Blender starts.
will do 👍
Works well in the latest 4.2 build, thanks for the fix 🎉 🙌
Committed
19dbcf5fc1
which should significantly improve the speed ofAssetList::iterate()
for large asset libraries in this case and similar ones. See #120699 for benchmarks.