aboutsummaryrefslogtreecommitdiffstats
path: root/src/Makefile_Efreet.am
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-08-23 11:59:37 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-08-23 12:04:06 +0900
commit561f8eaa8faebe32b9a03cf9674c147cf0d6d9ab (patch)
tree150e42dcb87333b146e884f6bf72dc5f561e7967 /src/Makefile_Efreet.am
parentefreet - fix efreet_*_dir_get() to support the xdg env vars (diff)
downloadefl-561f8eaa8faebe32b9a03cf9674c147cf0d6d9ab.tar.gz
efreet - save about 240-300k or so of memory used by efreet mime
so efreet mime was loading a bunch of mime type info files, parsing them on startup and allocating memory to store all this mime info - globs, mimetype strings and more. all a big waste of memory as its allocated on the heap per process where its the SAME data files loaded every time. so make an efreet mime cache file and a tool to create it from mime files. mmap this file with all the hashes/strings in it so all that data is mmaped once in memory and shared between all processes and it is only paged in on demand - as actually read/needed so if your process doesnt need to know about mime stuff.. it wont touch it anyway. this saves about 240-300k or so of memory in my tests. this has not covered the mime MAGIC files which still consume memory and are on the heap. this is more complex so it will take more time to come up with a nice file format for the data that is nicely mmaped etc. @optimize
Diffstat (limited to 'src/Makefile_Efreet.am')
-rw-r--r--src/Makefile_Efreet.am8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/Makefile_Efreet.am b/src/Makefile_Efreet.am
index 32d433016d..fe969f935c 100644
--- a/src/Makefile_Efreet.am
+++ b/src/Makefile_Efreet.am
@@ -90,7 +90,8 @@ bin_efreet_efreetd_DEPENDENCIES = @USE_EFREET_INTERNAL_LIBS@
efreetinternal_bindir=$(libdir)/efreet/$(MODULE_ARCH)
efreetinternal_bin_PROGRAMS = \
bin/efreet/efreet_desktop_cache_create \
-bin/efreet/efreet_icon_cache_create
+bin/efreet/efreet_icon_cache_create \
+bin/efreet/efreet_mime_cache_create
bin_efreet_efreet_desktop_cache_create_CPPFLAGS = -I$(top_builddir)/src/lib/efl $(EFREET_COMMON_CPPFLAGS)
bin_efreet_efreet_desktop_cache_create_LDADD = $(USE_EFREET_BIN_LIBS)
@@ -102,6 +103,11 @@ bin_efreet_efreet_icon_cache_create_LDADD = $(USE_EFREET_BIN_LIBS)
bin_efreet_efreet_icon_cache_create_DEPENDENCIES = @USE_EFREET_INTERNAL_LIBS@
bin_efreet_efreet_icon_cache_create_SOURCES = bin/efreet/efreet_icon_cache_create.c
+bin_efreet_efreet_mime_cache_create_CPPFLAGS = -I$(top_builddir)/src/lib/efl $(EFREET_COMMON_CPPFLAGS)
+bin_efreet_efreet_mime_cache_create_LDADD = $(USE_EFREET_BIN_LIBS)
+bin_efreet_efreet_mime_cache_create_DEPENDENCIES = @USE_EFREET_INTERNAL_LIBS@
+bin_efreet_efreet_mime_cache_create_SOURCES = bin/efreet/efreet_mime_cache_create.c
+
### Unit tests
if EFL_ENABLE_TESTS