Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2014-01-16 00:03:48 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2014-01-16 00:07:59 +0400
commit95acd3b20a494d083ae2a3d5afa25d5bdf310ac8 (patch)
tree5e8304764035e38e6b71e4dbd00c4728f7318e57 /source/blender/blenkernel/intern/scene.c
parentc78d9a318429703463a74df5ad23722ab37e1bbb (diff)
Tweak to early threaded update escape
Issue was caused by some objects being in bMain and tagged for update but not being in the DAG. This means objects wouldn't be updated and their recalc flag remains untouched triggering threaded for the next frame. Solved by tweaking POST_UPDATE_HANDLER_WORKAROUND in the way that it checks objects' recalc flags from the DAG, not from the bMain. This will work a bit longer since DAG stored more nodes than objects in the scene, but this code only runs in cases when there're some objects tagged for update, which keeps overall CPU usage on such a workaround pretty low. Now CPU usage on 11a_comp scene from project Pampa went down from ~15% down to ~5% (2,69 release uses ~%7). Pointed by Thomas Dinges in IRC.
Diffstat (limited to 'source/blender/blenkernel/intern/scene.c')
-rw-r--r--source/blender/blenkernel/intern/scene.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index c6a2dfb4482..8b3866076be 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -1563,7 +1563,7 @@ void BKE_scene_update_tagged(EvaluationContext *eval_ctx, Main *bmain, Scene *sc
DAG_ids_check_recalc(bmain, scene, FALSE);
/* clear recalc flags */
- DAG_ids_clear_recalc(bmain);
+ DAG_ids_clear_recalc(bmain, scene);
}
/* applies changes right away, does all sets too */
@@ -1639,7 +1639,7 @@ void BKE_scene_update_for_newframe(EvaluationContext *eval_ctx, Main *bmain, Sce
DAG_ids_check_recalc(bmain, sce, TRUE);
/* clear recalc flags */
- DAG_ids_clear_recalc(bmain);
+ DAG_ids_clear_recalc(bmain, sce);
#ifdef DETAILED_ANALYSIS_OUTPUT
fprintf(stderr, "frame update start_time %f duration %f\n", start_time, PIL_check_seconds_timer() - start_time);