summaryrefslogtreecommitdiff
path: root/src/lib/edje/edje_embryo.c
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-08-14 22:30:32 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-08-15 09:21:08 +0900
commit1d6a58cfc9f3bbe821eb04150e2b1e0ede7b32eb (patch)
tree6dc7780ff3d013ded3491a87149cd15bc20d12a5 /src/lib/edje/edje_embryo.c
parenta5232bb2839df9594e0bb3d810d3fc2ad24cb463 (diff)
edje - save memory on edje parts as a lot of over-allocation was done
so ... Edje_Calc_Params was huge ... like about 200 bytes. every part in every live edje object got one of these in addtion to real part struct info etc. ... so really every part was probably consuming 300-500 bytes or so... crazy. so i made a lot of the data now optional so only the minimum required is allocated now which cuts down about 110 or even 120 bytes per part, depending. 100 bytes was needed for 3d node parts even though almsot no parts are 3d node parts... the image and text data was 30-40 bytes so we consumed 100 even if we only used 30-40... so this cuts that done and puts in polace calc param cleanup funcs everywhere they are needed to clean up this extra allocated data. i also reduced this even more by maping pointers to req_drag, map and physics and clip_to fields in another extension struct cutting down another 28/52 bytes on most parts (in return for an added 4/8 bytes - on 32/64bit accordingly). in elementary_test this saves about ~300kb of ram for just having the etst run and displaying (peak memory measuremment). so massif says 10.6M -> 10.3M. @optimize
Diffstat (limited to 'src/lib/edje/edje_embryo.c')
-rw-r--r--src/lib/edje/edje_embryo.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/lib/edje/edje_embryo.c b/src/lib/edje/edje_embryo.c
index f7eeab68c9..1b899d71e9 100644
--- a/src/lib/edje/edje_embryo.c
+++ b/src/lib/edje/edje_embryo.c
@@ -2123,11 +2123,6 @@ case EDJE_PART_TYPE_##Short: \
2123 2123
2124 memset(rp->custom, 0, sizeof (Edje_Real_Part_State)); 2124 memset(rp->custom, 0, sizeof (Edje_Real_Part_State));
2125 2125
2126 rp->custom->p.map = eina_cow_alloc(_edje_calc_params_map_cow);
2127#ifdef HAVE_EPHYSICS
2128 rp->custom->p.physics = eina_cow_alloc(_edje_calc_params_physics_cow);
2129#endif
2130
2131 *d = *parent; 2126 *d = *parent;
2132 2127
2133 d->state.name = (char *)eina_stringshare_add("custom"); 2128 d->state.name = (char *)eina_stringshare_add("custom");