evas sw generic - don't dlopen osmesa until first needed.
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>
Thu, 11 Jan 2018 17:41:50 +0000 (02:41 +0900)
committerWonki Kim <wonki_.kim@samsung.com>
Wed, 17 Jan 2018 09:19:28 +0000 (18:19 +0900)
commite45e592c3e17a9fb58864d0d2d0175e3c95c5688
treed9a1c76204f0eb399ebfad7b3bfc41173450d4eb
parent610bd655d1952e1837a94b5f97a1753eca9f1ce3
evas sw generic - don't dlopen osmesa until first needed.

osmesa needs llvm. llvm apparently just by dlopening or linking to the
lib (libLLVM...) gets you 3.5mb of dirty pages just in this lib. that's
a whole lib entirely dirty pages. odd and horrible. in fact once i
stoppd dlopening OSMesa all the time on engine init (and only when gl
is needed)... the amount of dirty pages went from 17208 to 8860.
that's a whopping drop of 8mb! 8mb saved! in fact just dlopening
osmesa and doing the other gl init stuff led to more anonymuse
mappings with dirty pages. 2 of them (2072k and 2076k) which baffled
me as that didn't seem like heap or efl's own data. these disappeared
along with libLLVM-5.0.so (3520k + 60k dirty pages). we stopped
linking/loading libedit (12k dirty), libglapi (20k dirty),
libLLVM-5.0 (3580k dirty), libncursesw (72k dirty),
libOSMesa.so (260k dirty), libtinfo (20k dirty). ... or at least
stopped until absolutely needed. total 17208k of dirty pages went down
to 8860.

my test case was just launching terminology (and doing nothing with it).

@fix memory bloating
src/modules/evas/engines/software_generic/evas_engine.c