diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2019-03-29 01:24:25 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2019-03-29 01:24:25 +0300 |
commit | 7cbd1b0c98cc974b8cfb4f92da19249346062319 (patch) | |
tree | a492277810aed21b6da48530d982e925d5317b8a /source/blender/draw | |
parent | 4d71b655ec05d4fcee72d4606e97a3e146804054 (diff) |
Eevee: Render: Reduce debug print amount to not decrease perf
This is to fix the slowdown issue experienced on windows when rendering
from command line.
Fix T59649 Eevee in command-line batch mode is slow with particles/duplis
Diffstat (limited to 'source/blender/draw')
-rw-r--r-- | source/blender/draw/engines/eevee/eevee_render.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_render.c b/source/blender/draw/engines/eevee/eevee_render.c index 158b008bc14..07be0ad750d 100644 --- a/source/blender/draw/engines/eevee/eevee_render.c +++ b/source/blender/draw/engines/eevee/eevee_render.c @@ -169,7 +169,10 @@ void EEVEE_render_cache( } } - if (engine) { + /* Don't print dupli objects as this can be very verbose and + * increase the render time on Windows because of slow windows term. + * (see T59649) */ + if (engine && (ob->base_flag & BASE_FROM_DUPLI) == 0) { char info[42]; BLI_snprintf(info, sizeof(info), "Syncing %s", ob->id.name + 2); RE_engine_update_stats(engine, NULL, info); @@ -524,13 +527,17 @@ void EEVEE_render_draw(EEVEE_Data *vedata, RenderEngine *engine, RenderLayer *rl DRW_viewport_matrix_override_set(g_data->viewinv, DRW_MAT_VIEWINV); /* Refresh Probes */ - RE_engine_update_stats(engine, NULL, "Updating Probes"); EEVEE_lightprobes_refresh(sldata, vedata); EEVEE_lightprobes_refresh_planar(sldata, vedata); - char info[42]; - BLI_snprintf(info, sizeof(info), "Rendering %u / %u samples", render_samples + 1, tot_sample); - RE_engine_update_stats(engine, NULL, info); + /* Don't print every samples as it can lead to bad performance. (see T59649) */ + if ((render_samples % 25) == 0 || + (render_samples + 1) == tot_sample) + { + char info[42]; + BLI_snprintf(info, sizeof(info), "Rendering %u / %u samples", render_samples + 1, tot_sample); + RE_engine_update_stats(engine, NULL, info); + } /* Refresh Shadows */ EEVEE_lights_update(sldata, vedata); |