maybe a options to have 0 film refreshes
if i want to render a animation i dont want any film refreshes because it migth effect preformance a little bit and that might matter for animation. i can set the refresh time to a insane number but not to infinety and it still refreshes at the start.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
I was curious and played around a bit.
Possibly the following line could get a reduced sleep time, e.g. 1/20 instead of 1/5:
https://github.com/LuxCoreRender/BlendLuxCore/blob/master/engine/final.py#L173
Similarly I changed this block
https://github.com/LuxCoreRender/BlendLuxCore/blob/master/engine/final.py#L132
and removed everything but the stats update and break condition. Besides not having any preview draw, this means to ignore the update_stats condition and just do it every 1/20 s. instead of every second by default. It only seems to take around 1 ms so there is no large penalty. Effectively checking stats more often would make the engine stop closer to the halt condition, as well as more consistently between frames.
The most difference I achieved on the default cube as an animation, with 5s halt time, was a drop in render time of 10%.
However, from other tests with ~ 1 minute long stills it seems that the reduced render time will just simply scale with the samples rendered. For the animation test I could not assess this, as I didn't know how to catch the final samples of every frame.
In conclusion: It seems to me that the viewport draw doesn't require a lot of CPU time and the longer rendering time just corresponds to more samples rendered. Tuning some settings could produce a slightly more consistent render time between animation frames and bring the render time reported by blender closer to the halt conditions set by the user. Tests with more scenes/PCs/render settings might be advisable.
For some edge cases, it might indeed be good to have the option to disable any film drawing.
Off-topic:
Effectively checking stats more often would make the engine stop closer to the halt condition, as well as more consistently between frames.
In the past, session.UpdateStats() was an expensive operation coupled to the film size, as is indicated in the comment here.
In some tests I did recently it seemed like this is no longer the case, probably since the rework to use only one film shared by all CPU threads. So I guess it's now possible to check the stats more often to respond to halt conditions more quickly.
edit: It seems it is still expensive when rendering on the GPU. Only checks on the CPU are now much faster.