Blender 4.2 Dyntopo sculpt fist stroke performance is very laggy #120593
Labels
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
Interest: X11
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
5 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#120593
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
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: Windows-10-10.0.22621-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 3090/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 552.12
Blender Version
Broken: version: 4.2.0 Alpha, branch: main, commit date: 2024-04-11 21:26, hash:
52cff75ce080
Worked: (4.1)
Short description of error
When sculpting a mesh of 500.000 triangles in Dyntopo, the first stroke of any of the tools is very laggy, then on the second stroke it improves a lot. It was OK in 4.1
Exact steps for others to reproduce the error
In 4.2 is much more laggy than in 4.1 in the first stroke, at least in the file I'm working on.
I can't reproduce it on a default cube, but I can upload my file if needed
Blender 4.2 Dyntopo sculpt performance is much worse than 4.1to Blender 4.2 Dyntopo sculpt fist stroke performance is very laggyI can confirm that 4.2 is much slower than 4.0.
I attach the file I used for testing.
It may be a little difficult to bisect due to another regression in the area.
@HooglyBoogly, does this ring any bells?
Unfortunately nothing is standing out in performance profiles for me, and I'm not really noticing a noticeable performance difference between the first and second brush strokes.
do I upload the file to have a look at it?
I did a bit of timing with
SCOPED_TIMER
over the weekend and noticed thatSCULPT_stroke_get_location_ex
insidesculpt.cc
is where the slowdown is happening; I haven't had the chance to dig much further into it though.I was able to repro even with a simple plane heavily subdivided. With an M1 MBA so is platform independent.
Performed several traces on Blender. The first stroke indeed takes longer (detected as hangs in red in XCode Instruments Profiler -> Time Profile)
The second stroke is a bit faster in this case so is not marked in red. By inspecting the call stack I could not find a standing difference, in fact the heaviest call stack is the same for the first and the second stroke:
Heaviest Call Stack Stroke 1 (Severe Hang)
Heaviest Call Stack Stroke 2
As for which commit may have caused the regression I can't tell exactly since trying to go back that far in time
gives me lots of libraries and dependency errors compiling Blender to effectively triage.
The most recent and significant commit in those files has been this refactor from @HooglyBoogly https://projects.blender.org/blender/blender/commit/488de130b39764b2d8564594fc720aa6159e3f39
If someone can test blender before and after that commit we could confirm or rule it out.
@HooglyBoogly could you double check that commit? maybe is a tiny change that caused the overhead and is buried in that refactor?
We agreed in the module meeting to use the "Normal" priority for this report, since it's just the first stroke with the issue, and because the issue isn't clear in the code, so it may be best handled as part of general optimization development.