Hello, I have been chasing source of memory consumption in EFL since a few weeks now. There is one source that I didn't hunt yet, callbacks. In some small elementary_test they easily get over 400KB of Evas_Func_Node. This func node are not that big, but they are still a list with a function pointer, two integer and a data pointer. When we look at our usage, in a lot of place, we do have the same pattern. We register a set of callbacks for always the same event with the function pointer and priority. The only thing that change is the data pointer. Instead of using a list, we could use an array, that would reduce our memory use, but still, not enough. Maybe overall, it wouldn't even b a win if we use an Eina_Inarray or an Eina_Array as they do require two additional integer, so the base structure when you have no callbacks will be bigger. So what we could do is provide an API to register a static const array of function pointer and event like an callback class. This pattern would match our use in Edje, Elementary and even Terminology. One "class" of callback per object, instead of n instance of callbacks per object. That should really reduce the memory we use for that. I don't want to push this new API in Evas, because we have that pattern with edje signal, smart callback and object callback. I think it should go to Eo and we should move our code to use such API.
Any comments, though on that subject. Have fun, -- Cedric BAIL ------------------------------------------------------------------------------ Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnnow-d2d _______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
