fixme notes - fixme: many instances of module loading that bloat our mem

This commit is contained in:
Carsten Haitzler 2014-01-06 12:16:36 +09:00
parent a2d55c2b82
commit 6f685d7608
5 changed files with 19 additions and 0 deletions

View File

@ -183,6 +183,11 @@ ecore_system_modules_load(void)
eina_prefix_lib_get(_ecore_pfx));
module_list = eina_module_arch_list_get(module_list, buf, MODULE_ARCH);
// XXX: MODFIX: do not list ALL modules and load them ALL! this is
// just polluting memory pages and I/O with modules and code that
// is then never used. detetc the module we need to use them use
// that. if anything load each module, have it do a detect and if
// it fails UNLOAD and try the next one.
eina_module_list_load(module_list);
}

View File

@ -93,6 +93,9 @@ ecore_imf_module_init(void)
snprintf(buf, sizeof(buf), "%s/ecore_imf/modules", eina_prefix_lib_get(pfx));
module_list = eina_module_arch_list_get(module_list, buf, MODULE_ARCH);
// XXX: MODFIX: do not list ALL modules and load them ALL! this is
// is wrong - we end up loading BOTH xim ANd scim (and maybe uim too)
// etc. etc. when we need only 1!
eina_module_list_load(module_list);
}

View File

@ -107,6 +107,9 @@ eeze_sensor_modules_load(void)
ERR("No modules found!");
return;
}
// XXX: MODFIX: do not list ALL modules and load them ALL! this is
// this will, for example, load both udev AND fake modules - run
// their init funcs etc. etc. why? no!
eina_module_list_load(g_handle->modules_array);
}

View File

@ -200,6 +200,9 @@ eina_mempool_init(void)
goto mempool_init_error;
}
// XXX: MODFIX: do not list ALL modules and load them ALL! this is
// wrong. load the module we need WHEN we need it (by name etc. etc.
// from api).
eina_module_list_load(_modules);
/* builtin backends */

View File

@ -202,6 +202,11 @@ _ethumb_plugins_load(void)
_plugins = eina_module_arch_list_get(_plugins, buf, MODULE_ARCH);
load:
// XXX: MODFIX: do not list ALL modules and load them ALL! this is
// wasteful. admittedly this is low priority as we have only 1
// module - and that is emotion and ethumbd slaves die off quickly
// but we still pay a module load, init func etc. price even if
// the code is never needed!
if (_plugins)
eina_module_list_load(_plugins);