edje - save memory on edje parts as a lot of over-allocation was done
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>
Sun, 14 Aug 2016 13:30:32 +0000 (22:30 +0900)
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>
Mon, 15 Aug 2016 00:21:08 +0000 (09:21 +0900)
commit1d6a58cfc9f3bbe821eb04150e2b1e0ede7b32eb
tree6dc7780ff3d013ded3491a87149cd15bc20d12a5
parenta5232bb2839df9594e0bb3d810d3fc2ad24cb463
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
src/lib/edje/edje_calc.c
src/lib/edje/edje_embryo.c
src/lib/edje/edje_load.c
src/lib/edje/edje_private.h
src/lib/edje/edje_program.c
src/lib/edje/edje_text.c