Page MenuHomePhabricator

evas/optimization: avoid injecting destroyed objects back into evas.
Needs RevisionPublic

Authored by smohanty on May 6 2020, 10:32 PM.

Details

Reviewers
Hermet
raster
CHAN
Summary

Issue:

the evas list (layer->objects) gets really huge as we keep the destroyed objects for
render phase sometime growing in the range of ( 1000 - 6000) when we create some objects
and delete them in a single frame without showing them in the screen. in the process
when the evas_event_thaw() called it goes through this huge list lot of times which reduces
the performance and avoids lot of eo calls.

Fix:

Idea is if we are creating and deleting a evas object in the same frame(or render phase is not started for this object)
we should not inject it back to evas which keeps the list smaller hence improving the launch time.

usecase:

elemenatry_test -to genlist launch time.

Diff Detail

Repository
rEFL core/efl
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 16685
Build 11091: arc lint + arc unit
smohanty created this revision.May 6 2020, 10:32 PM

It seems that this patch has no reviewers specified. If you are unsure who can review your patch, please check this wiki page and see if anyone can be added: https://phab.enlightenment.org/w/maintainers_reviewers/

smohanty requested review of this revision.May 6 2020, 10:32 PM
smohanty added a reviewer: CHAN.

Ummm... the object could be in the scene graph for a render cycle, never be shown or rendered and it'll then hang around in the scene graph just like before until some render cycles flush it out, because it will then be flagged as being in the graph and behave just like before.

Ummm... the object could be in the scene graph for a render cycle, never be shown or rendered and it'll then hang around in the scene graph just like before until some render cycles flush it out, because it will then be flagged as being in the graph and behave just like before.

Well ideally the current implementation is not wrong . but the only problem is in some use cases the list grows to 1000 in case of genlist during launch time and as we access this list during evas_event_thaw() (which gets called 100's of time) during launch the total time adds up.

I just did a quick check (this list traversal and calling eo functions ) adds > 50ms to the launch time .

smohanty changed the visibility from "Public (No Login Required)" to "No One".May 7 2020, 6:32 PM
raster added a comment.May 8 2020, 7:06 AM

you made this diff invisible to the world - even admins and phab users. i had to dig into the mysql db to fix it. please don't do this :( i'ts a time sink to fix. :)

raster requested changes to this revision.May 8 2020, 7:09 AM

my point was that you flag this in being in the scene graph if it ever was processed. perhaps it's better to flag it if it ever was rendered.... then this seems like an ok work-around to calling evas_norender(). evs_norender is still needed if the canvas doesn't render again etc. to clean up objects that have since been freed.

This revision now requires changes to proceed.May 8 2020, 7:09 AM