cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=e663b9da5521ad962d18d20e8def48c3e4bd786b
commit e663b9da5521ad962d18d20e8def48c3e4bd786b Author: Mike Blumenkrantz <zm...@samsung.com> Date: Tue Jul 16 15:31:46 2019 -0400 evas/box: avoid triggering smart_move callback any time an evas box is moved, it flags itself to do a recalc on all of its contents in the next render. evas box also inherits from smart clipped class, however, which means that it will also move all of its contents immediately on every single move. this results in something like: move(box) -> for content in box { move(content) } -> render -> recalc(box) -> for content in box { calc(content); move(content); } which is massively inefficient and results in box being completely unusable once it has a large number of contents by skipping immediate move() calls for all the box contents, we can bring this performance back to usable levels @fix Reviewed-by: Cedric BAIL <cedric.b...@free.fr> Differential Revision: https://phab.enlightenment.org/D9336 --- src/lib/evas/canvas/evas_object_box.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/lib/evas/canvas/evas_object_box.c b/src/lib/evas/canvas/evas_object_box.c index 2981c20eaa..7a7173eb25 100644 --- a/src/lib/evas/canvas/evas_object_box.c +++ b/src/lib/evas/canvas/evas_object_box.c @@ -443,10 +443,16 @@ _evas_box_efl_gfx_entity_size_set(Eo *o, Evas_Object_Box_Data *_pd EINA_UNUSED, EOLIAN static void _evas_box_efl_gfx_entity_position_set(Eo *o, Evas_Object_Box_Data *_pd EINA_UNUSED, Eina_Position2D pos) { + Evas_Object_Smart_Clipped_Data *cso = evas_object_smart_data_get(o); if (_evas_object_intercept_call(o, EVAS_OBJECT_INTERCEPT_CB_MOVE , 0, pos.x, pos.y)) return; - efl_gfx_entity_position_set(efl_super(o, MY_CLASS), pos); + efl_gfx_entity_position_set(cso->clipper, pos); + /* this skips the call to _evas_object_smart_clipped_smart_move_internal + * since box internals will automatically recalc all the child positions + * at a later point + */ + efl_gfx_entity_position_set(efl_super(o, EFL_CANVAS_GROUP_CLASS), pos); evas_object_smart_changed(o); } --