Performance regression of production file #55228

Closed
opened 2018-05-28 16:50:41 +02:00 by Hjalti Hjálmarsson · 12 comments

Open:
/scenes/01-opening/01_050_A/01_050_A.anim.blend

In 2.79 we get 13-14 fps on my shitty computer... 12 fps should be the bare minimum (it's only one visible character in a simple scene with everything simplified)

Open: /scenes/01-opening/01_050_A/01_050_A.anim.blend In 2.79 we get 13-14 fps on my shitty computer... 12 fps should be the bare minimum (it's only one visible character in a simple scene with everything simplified)
Author
Member

Added subscriber: @Hjalti

Added subscriber: @Hjalti
Campbell Barton was assigned by Dalai Felinto 2018-05-28 16:59:26 +02:00
Member

Added subscriber: @JoshuaLeung

Added subscriber: @JoshuaLeung
Member

Just a note - if the performance woes are due to animation editors (specifically the timeline), I've got some plans already for optimising a bit there. I was going to try to work on that this week if time allows. (Specifically, my plan would also help resolve some other issues animators were having with functional side of things, by deduplicating a lot of the calculations that go into drawing the keyframes).

Just a note - if the performance woes are due to animation editors (specifically the timeline), I've got some plans already for optimising a bit there. I was going to try to work on that this week if time allows. (Specifically, my plan would also help resolve some other issues animators were having with functional side of things, by deduplicating a lot of the calculations that go into drawing the keyframes).

Added subscriber: @fsiddi

Added subscriber: @fsiddi

Added subscriber: @brecht

Added subscriber: @brecht

Measuring on my dual core laptop, I see this:

  • 23% copying meshes, particularly copying of MDeformVert (vertex groups) with many small alloc/free
  • 18% BKE_animsys_eval_driver due to slow BLI_findindex/BLI_findlink in long lists
  • 16% drawing (6% 3D viewport, 4% sequencer, 3% properties, 2% action editor, ..)
  • 16% armature deform modifier evaluation, particularly bbones
  • 15% other modifier evaluation (mesh deform, lattice, vertex group, ..)
  • 4% pose evaluation
  • 3% depsgraph

With more cores the bottlenecks will change though. I expect parallel driver/modifier/pose evaluation to be faster and single threaded copying of big meshes and drawing to be slower.

In 2.79 it looks roughly like this:

  • 65% modifier evaluation
  • 21% drawing
  • 8% pose evaluation
  • 3% copying meshes (MDeformVert data layers are mostly referenced, not duplicated)
Measuring on my dual core laptop, I see this: * 23% copying meshes, particularly copying of `MDeformVert` (vertex groups) with many small alloc/free * 18% `BKE_animsys_eval_driver` due to slow `BLI_findindex`/`BLI_findlink` in long lists * 16% drawing (6% 3D viewport, 4% sequencer, 3% properties, 2% action editor, ..) * 16% armature deform modifier evaluation, particularly bbones * 15% other modifier evaluation (mesh deform, lattice, vertex group, ..) * 4% pose evaluation * 3% depsgraph With more cores the bottlenecks will change though. I expect parallel driver/modifier/pose evaluation to be faster and single threaded copying of big meshes and drawing to be slower. In 2.79 it looks roughly like this: * 65% modifier evaluation * 21% drawing * 8% pose evaluation * 3% copying meshes (`MDeformVert` data layers are mostly referenced, not duplicated)

Added subscriber: @Sergey

Added subscriber: @Sergey

I've brought dependency graph evaluation time to almost same figure as in 2.79 by implementing CD_REFERENCE for mesh-based modifier stack. Memory usage is still higher than it should be, likely because we're having more custom data layers in the result as we need.

Framerate went up from 4 to 6.3 on my desktop, but 2.79 figure is 12fps. So still long way to go, but need to re-investigate what is the bottleneck now.

I've brought dependency graph evaluation time to almost same figure as in 2.79 by implementing CD_REFERENCE for mesh-based modifier stack. Memory usage is still higher than it should be, likely because we're having more custom data layers in the result as we need. Framerate went up from 4 to 6.3 on my desktop, but 2.79 figure is 12fps. So still long way to go, but need to re-investigate what is the bottleneck now.
Campbell Barton was unassigned by Brecht Van Lommel 2018-05-31 12:02:32 +02:00
Brecht Van Lommel self-assigned this 2018-05-31 12:02:32 +02:00

Added subscriber: @ideasman42

Added subscriber: @ideasman42

Some optimizations committed:

On @Sergey's computer it appears XInitThreads() has a big impact on the fps, but not on other computers, it's unclear still.

On Hjalti's computer fps is in the 15-16 range now.

Some optimizations committed: * e4afccf * 1e6108e * fcfe196 * 9948e26 On @Sergey's computer it appears `XInitThreads()` has a big impact on the fps, but not on other computers, it's unclear still. On Hjalti's computer fps is in the 15-16 range now.

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

One more optimization:

Performance should be at least as good as 2.7 now, and usually a few fps more.

For XInitThreads() I've created #55287.

One more optimization: * 01c75c3 Performance should be at least as good as 2.7 now, and usually a few fps more. For `XInitThreads()` I've created #55287.
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
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
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#55228
No description provided.