2.72 Freestyle renders two times longer on Linux #41964
Closed
opened 2014-09-26 13:29:12 +02:00 by Piotr Połomski
·
47 comments
No Branch/Tag Specified
main
asset-browser-frontend-split
blender-v3.6-release
temp-sculpt-dyntopo
temp-sculpt-dyntopo-hive-alloc
node-group-operators
brush-assets-project
asset-shelf
tmp-usd-python-mtl
blender-v2.93-release
blender-v3.3-release
universal-scene-description
temp-sculpt-attr-api
blender-v3.5-release
realtime-clock
sculpt-dev
gpencil-next
bevelv2
microfacet_hair
blender-projects-basics
principled-v2
v3.3.7
v2.93.18
v3.5.1
v3.3.6
v2.93.17
v3.5.0
v2.93.16
v3.3.5
v3.3.4
v2.93.15
v2.93.14
v3.3.3
v2.93.13
v2.93.12
v3.4.1
v3.3.2
v3.4.0
v3.3.1
v2.93.11
v3.3.0
v3.2.2
v2.93.10
v3.2.1
v3.2.0
v2.83.20
v2.93.9
v3.1.2
v3.1.1
v3.1.0
v2.83.19
v2.93.8
v3.0.1
v2.93.7
v3.0.0
v2.93.6
v2.93.5
v2.83.18
v2.93.4
v2.93.3
v2.83.17
v2.93.2
v2.93.1
v2.83.16
v2.93.0
v2.83.15
v2.83.14
v2.83.13
v2.92.0
v2.83.12
v2.91.2
v2.83.10
v2.91.0
v2.83.9
v2.83.8
v2.83.7
v2.90.1
v2.83.6.1
v2.83.6
v2.90.0
v2.83.5
v2.83.4
v2.83.3
v2.83.2
v2.83.1
v2.83
v2.82a
v2.82
v2.81a
v2.81
v2.80
v2.80-rc3
v2.80-rc2
v2.80-rc1
v2.79b
v2.79a
v2.79
v2.79-rc2
v2.79-rc1
v2.78c
v2.78b
v2.78a
v2.78
v2.78-rc2
v2.78-rc1
v2.77a
v2.77
v2.77-rc2
v2.77-rc1
v2.76b
v2.76a
v2.76
v2.76-rc3
v2.76-rc2
v2.76-rc1
v2.75a
v2.75
v2.75-rc2
v2.75-rc1
v2.74
v2.74-rc4
v2.74-rc3
v2.74-rc2
v2.74-rc1
v2.73a
v2.73
v2.73-rc1
v2.72b
2.72b
v2.72a
v2.72
v2.72-rc1
v2.71
v2.71-rc2
v2.71-rc1
v2.70a
v2.70
v2.70-rc2
v2.70-rc
v2.69
v2.68a
v2.68
v2.67b
v2.67a
v2.67
v2.66a
v2.66
v2.65a
v2.65
v2.64a
v2.64
v2.63a
v2.63
v2.61
v2.60a
v2.60
v2.59
v2.58a
v2.58
v2.57b
v2.57a
v2.57
v2.56a
v2.56
v2.55
v2.54
v2.53
v2.52
v2.51
v2.50
v2.49b
v2.49a
v2.49
v2.48a
v2.48
v2.47
v2.46
v2.45
v2.44
v2.43
v2.42a
v2.42
v2.41
v2.40
v2.37a
v2.37
v2.36
v2.35a
v2.35
v2.34
v2.33a
v2.33
v2.32
v2.31a
v2.31
v2.30
v2.28c
v2.28a
v2.28
v2.27
v2.26
v2.25
Labels
Clear labels
Issues relating to security: https://wiki.blender.org/wiki/Process/Vulnerability_Reports
Apply labels
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
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
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
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
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
Issues relating to security: https://wiki.blender.org/wiki/Process/Vulnerability_Reports
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 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
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
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
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
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
Milestone
Set milestone
Clear milestone
No items
No Milestone
Projects
Set Project
Clear projects
No project
Assignees
Assign users
Clear assignees
No Assignees
8 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#41964
Reference in New Issue
There is no content yet.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
System Information
Debian 7.5
GPU: Nvidia GeForce 9800 GT
CPU: Intel Core 2 3GHz
RAM: 6GB RAM
Blender Version
Broken: Linux versions: 2.72
eb464ee
(blender-2.72-RC1-linux-glibc211-x86_64) and previous testbuild (blender-2.72-testbuild1-linux-glibc211-x86_64)Worked: 2.6; 2.7; 2.71, 2.72 windows 64 version
Short description of error
The problem is too long Freestyle Stroke rendering. Simple file with Ve: 19k, Fa: 22k is rendering about 14 seconds. It is long, but linux version 2.72 testbuild and RC1 doing the same two times longer, need about 27-30 seconds.
Exact steps for others to reproduce the error
Open file nut.blend and render in Linux and Windows versions.
Changed status to: 'Open'
Added subscriber: @PiotrPL
Added subscriber: @mont29
Tamito, this one sounds for you. :)
Thanks Bastien. :)
Hello, I tested yesterday released 2.72
95182d1
(blender-2.72-linux-glibc211-x86_64.tar.bz2) and Freestyle Stroke rendering still takes two times longer than 2.71I thought the report concerns a difference of rendering speeds between Linux and Windows. Do you mean that you have observed different rendering speeds between 2.71 and 2.72 both on Linux?
Rendering about 14sec on versions:
f93bc76
a19c1be
eb464ee
Rendering two times longer on versions:
eb464ee
95182d1
The same file, with the same rendering parameters.
Added subscriber: @JulianEisel
Any news here? Getting quite old now.
Not much news from my side. I personally don't have a Linux box that can reproduce the reported speed problem. A friend of mine who uses Blender/Freestyle under Linux told me that he did not observe the issue.
@PiotrPL,
I suppose that you render the .blend file from within the Blender user interface. What happens if you render the file by one of the following ways?
This test will help us check if the slowness comes from Freestyle.
Added subscriber: @zeauro
I am under ubuntu 14.04 64bits.
The blend gives me these results :
2.71 : 10s 20
2.72b : 21s
2.72.3 hash
602250d
: 12sAdded subscriber: @Blendify
Here are my stats compared to Ubuntu and windows
here is my specs
intel hd graphics 4600
blender 2.72b
Could you guys test with all Add-Ons disabled? We had similar issues caused by Add-Ons.
Tested with Ubuntu and took twice as long with add-ons disabled about 1min 20 sec
tested with
646a96b
I cannot test on my workstation but on my laptop without addons.
2.71 20s
2.72b 52s
2.73fa0a 47s
Thanks, seems like Add-ons aren't the problem
Thank you all for the additional tests, very much appreciated!
If a few more test runs are acceptable, could you guys please do test renders with the
--debug-freestyle
command-line option specified when you start Blender? This will generate a lot of debug information on the console including the breakdown of Freestyle rendering time, which might allow us to identify the cause(s) of slow rendering on Linux. Please, consider saving the console output in a text file (e.g., by redirecting the standard output of Blender to a file as in./blender --debug-freestyle > output.txt
) and attaching the file to a reply. Thanks in advance.output271.txt
output272b.txt
output273_0fcf9b2.txt
@zeauro Many thanks for the test results. Your logs allowed me to break down Freestyle time components. According to the analysis of timing information, there are no big differences in the Freestyle time components among Blender versions (see the comparisons in the attached PDF file). It looks like the slowness comes from somewhere outside the Freestyle rendering core.
20141224_zeauro_logs.pdf
Now I guess I have to look into the Blender rendering pipeline to identify the cause of the slowness...
Added subscribers: @kjym3, @JoshuaLeung, @ideasman42, @Sergey
@kjym3, the issue is barely visible with regular builds and totally visible when using jemalloc (probably because of different memory layout in that case or so).
The issue is introduced by
0464876
which in fact unleashes really evil aspect of freestyle. The thing here is, datablock data free would check if the datablock is used as a target of some driver (if it was used then driver's target ID would be set to NULL). Before the mentioned commit freestyle did not sent proper main to datablock free function, so iteration happened inside the wrong list. Now iteration happens with the proper list.The cause of slowdown is the freestyle main free. It seems to contain around 13K datablocks, and assuming datablock deletion is O(n^2) that's gonna to take quite some time.
Hereby i'm raising some questions:
@Sergey It is necessary to iterate through each driver when freeing it, because we need to free the DriverVariable instances (on the ChannelDriver), then the ChannelDriver (on the FCurve).
@Sergey,
The issue of too many data blocks (mostly meshes) was one of problems I have addressed as part of my BF project (Apr-Sept 2014) for Freestyle performance optimization. A quick test on my side showed that when the performance optimization was applied, only one mesh data block was created for rendering the test scene rather than 13K data blocks. The actual number of auto-generated data blocks can still be arbitrarily large depending on input scenes, but is expected to be much smaller than non-optimized versions. Integrating the optimization coding results into Git master is a 2.74 target.
Freestyle does not use drivers at all.
@JoshuaLeung, i'm having hard time to understand why we need to do drivers on datablock free but don't need to do constraint/modifiers/parents etc at the same time actually.
@kjym3, that sounds good.
For those who compile Blender from source, here is a patch for the aforementioned Freestyle rendering optimization (rebased onto Git master, with a lot of conflicts addressed). The patch should apply cleanly to the latest HEAD as of this writing.
stroke_render_optimization.patch
Maybe it is too late to include this revision to the 2.73 release.
@kjym3, we can not accept this for 2.73, but master branch is open now so you can commit it for 2.74 when it's ready.
hello, I think I found solution, need to go to Freestyle Line Style, then in Strokes tab, check Chaining checkbox (and select Plain, check Same Object). Now nut.blend file renders for about 2 seconds! I hope it helps
@kjym3, maybe you could create some testbuilds using the experimental-build branch (instructions here )? The folks here could test this then before committing.
I think I will just commit the proposed patch to git master after I test it a bit more. Then nightly builds will soon allow testers to check if the reported slowness has been addressed.
I will test tomorrow unless you know what hash it has been placed into
The patch stroke_render_optimization.patch has been committed in Git master:
d8b00a3bf5
. Further performance tests would be much appreciated.This did not work for me rendered on CPU with Ubuntu 14.04
Used blender Linux 64 bit Official blender-2.73-
8a28895
-linux-glibc211-x86_64.tar.bz2 94M Sat Jan 3 03:12:20 2015Render time 3:15.95
Windows 8.0
I used blender version: Windows 64 bit Official blender-2.73-
8a28895
-win64.zip 100M Sat Jan 3 03:13:48 2015Render time: 56.49
Windows 8.0 Hardware specs
Ubuntu same specs but 7.5 GB of RAM (Virtual Machine)
Five and a half times slower!!!
@Blendify you cant expect a virtual machine to render as fast as a real machine... it only uses a part of the available hardware...
@JulianEisel even though it is a virtual machine it still is dramatically different from the first time I tested under the same testing environment.
First test from earlier comments
Please never, ever use a virtual machine for bug reports in general, and performance tests in particular. The use of a single instruction somewhere can make the whole code orders of magnitude slower than on 'native' OS - or not. In other words, performances test results from a VM are absolutely meaningless.
Thanks for the feed back I would like to some day set up a split hard drive
Using a VM to do performance test, the result depends on much more factors than on a real installation. Even if you think everything is the same it may not be so. So just as Bastien said, performance tests on a VM are meaningless :/
Hello, would You like to test render time of the same file (now Strokes Chaining is checked) nut-stroke.blend Now render time is about 2-3 seconds on my Debian Nvidia GeForce 9800 GT & Intel Core 2 3GHz
What's the latest status here? Could somebody test again so we can see if the issue has been resolved?
The issue has been resolved.
On my workstation, the original file of bugreport takes 20 seconds with 2.73a but only 1 s with current master
0f65250
.With nut-stroke.blend, results are 1.12 s with 2.73a and 0.85 s with current master
0f65250
.Changed status from 'Open' to: 'Resolved'
That's good news! Closing as Resolved then :)