Page MenuHomePhabricator

Evas: Reduce memory usage at _evas_object_pointer_data_get()
ClosedPublic

Authored by iscaro on Dec 9 2016, 9:54 AM.

Details

Summary

This series tries to reduce the memory footprint caused by
_evas_object_pointer_data_get(). I did my tests running elementar_test
under X11.

Commits:

Efl.Canvas.Object: Reduce memory used to store Evas_Object_Pointer_Data.

The hash implementation demonstrated that too much memory was being used
to store the Evas_Object_Pointer_Data. In order to reduce the memory usage
this patches now changes the Evas_Object_Pointer_Data storage to an Eina_Inlist and
now Massif profiles shows that the memory usage was drastically reduced.

Efl.Canvas.Object: Remove the extra parementer at _evas_object_pointer_data_get()

The Evas_Pointer_Data struct already contains a Efl.Input.Device pointer.

Diff Detail

Repository
rEFL core/efl
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
iscaro updated this revision to Diff 10279.Dec 9 2016, 9:54 AM
iscaro retitled this revision from to Evas: Reduce memory usage at _evas_object_pointer_data_get().
iscaro updated this object.
iscaro added reviewers: bdilly, raster, cedric.EditedDec 9 2016, 9:58 AM
iscaro added a subscriber: raster.

@raster, I changed the storage from hash to eina_inlist. At least under elementary_test massif don't even bother reporting the memory usage any more. I've uploaded the screenshots so you can check it. Please, let me know if this patch also reduces the memory usage for the case that you reported. Thanks.

Current implementation with Hash:

Using Eina_Inlist

Btw, I've uploaded this branch to devs/iscaro/memory in case you want to check it out.

Thanks.

jpeg added a comment.Dec 11 2016, 10:18 PM

Looks good

In D4474#75260, @jpeg wrote:

Looks good

Thanks!

cedric accepted this revision.Dec 12 2016, 4:37 PM
cedric edited edge metadata.

Sounds good to me also. Please proceed with landing.

This revision is now accepted and ready to land.Dec 12 2016, 4:37 PM
jpeg added a comment.Dec 12 2016, 5:14 PM
In D4474#75369, @cedric wrote:

Please proceed with landing.

Cabin crew, doors to manual and cross check.

raster edited edge metadata.Dec 12 2016, 7:20 PM

please wait... i need to check... :) my inbox has exploded lately... and i have some other issues dropping my available time. :(

raster accepted this revision.Dec 12 2016, 8:56 PM
raster edited edge metadata.

oh this is much better. it was multiple mb of memory before (about 2.5) now down to 150k. much better! can someone else push this.. my git master has some pending stuff so i might hold on this for a while...

bdilly accepted this revision.Dec 12 2016, 9:30 PM
bdilly edited edge metadata.
This revision was automatically updated to reflect the committed changes.
In D4474#75375, @jpeg wrote:
In D4474#75369, @cedric wrote:

Please proceed with landing.

Cabin crew, doors to manual and cross check.

lol.

Thanks all for the review.