raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=6f685d760851e1ccf33017b2a749008475e2ac7c

commit 6f685d760851e1ccf33017b2a749008475e2ac7c
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
Date:   Mon Jan 6 12:16:36 2014 +0900

    fixme notes - fixme: many instances of module loading that bloat our mem
---
 src/lib/ecore/ecore.c                | 5 +++++
 src/lib/ecore_imf/ecore_imf_module.c | 3 +++
 src/lib/eeze/eeze_sensor.c           | 3 +++
 src/lib/eina/eina_mempool.c          | 3 +++
 src/lib/ethumb/ethumb.c              | 5 +++++
 5 files changed, 19 insertions(+)

diff --git a/src/lib/ecore/ecore.c b/src/lib/ecore/ecore.c
index 5870206..3477aca 100644
--- a/src/lib/ecore/ecore.c
+++ b/src/lib/ecore/ecore.c
@@ -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);
 }
 
diff --git a/src/lib/ecore_imf/ecore_imf_module.c 
b/src/lib/ecore_imf/ecore_imf_module.c
index d16ad6e..c8e6819 100644
--- a/src/lib/ecore_imf/ecore_imf_module.c
+++ b/src/lib/ecore_imf/ecore_imf_module.c
@@ -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);
 }
 
diff --git a/src/lib/eeze/eeze_sensor.c b/src/lib/eeze/eeze_sensor.c
index 7dee614..30c5d3c 100644
--- a/src/lib/eeze/eeze_sensor.c
+++ b/src/lib/eeze/eeze_sensor.c
@@ -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);
 }
 
diff --git a/src/lib/eina/eina_mempool.c b/src/lib/eina/eina_mempool.c
index 1757975..29fc829 100644
--- a/src/lib/eina/eina_mempool.c
+++ b/src/lib/eina/eina_mempool.c
@@ -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 */
diff --git a/src/lib/ethumb/ethumb.c b/src/lib/ethumb/ethumb.c
index f1c5466..2a97e39 100644
--- a/src/lib/ethumb/ethumb.c
+++ b/src/lib/ethumb/ethumb.c
@@ -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);
 

-- 


Reply via email to