Enlightenment CVS committal Author : onefang Project : e17 Module : apps/e
Dir : e17/apps/e/src/bin Modified Files: e_apps.c Log Message: An experimental memory optimisation that seems to fix up the border issues. Changing the NO_APP_LIST define to 0 will put things back the way they where. This reuses a list that was sitting there doing nothing, and avoids adding things onto it that where already there, thus slowing down searches. =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_apps.c,v retrieving revision 1.184 retrieving revision 1.185 diff -u -3 -r1.184 -r1.185 --- e_apps.c 15 Sep 2006 17:44:23 -0000 1.184 +++ e_apps.c 15 Sep 2006 21:46:25 -0000 1.185 @@ -14,6 +14,7 @@ */ #define DEBUG 0 +#define NO_APP_LIST 1 /* local subsystem functions */ typedef struct _E_App_Change_Info E_App_Change_Info; typedef struct _E_App_Callback E_App_Callback; @@ -127,6 +128,11 @@ _e_apps_exit_handler = ecore_event_handler_add(ECORE_EXE_EVENT_DEL, _e_apps_cb_exit, NULL); _e_apps_border_add_handler = ecore_event_handler_add(E_EVENT_BORDER_ADD, _e_app_cb_event_border_add, NULL); _e_apps_all = e_app_new(buf, 1); +#if NO_APPS_LIST + /* The list already exists, and it doesn't care what order it is in. */ + if (_e_apps_all) + _e_apps_list = _e_apps_all->subapps; +#endif return 1; } @@ -265,7 +271,9 @@ a->mtime = st.st_mtime; stated = 1; } +#if ! NO_APP_LIST _e_apps_list = evas_list_prepend(_e_apps_list, a); +#endif } return a; @@ -337,6 +345,7 @@ E_OBJECT_CHECK(a); E_OBJECT_TYPE_CHECK(a, E_APP_TYPE); + /* FIXME: This is probably the wrong test. */ if (a->exe) return; if (a->scanned) { @@ -389,7 +398,9 @@ a3->parent = a; a->subapps = evas_list_append(a->subapps, a3); a2->references = evas_list_append(a2->references, a3); +#if ! NO_APP_LIST _e_apps_list = evas_list_prepend(_e_apps_list, a3); +#endif } else e_object_del(E_OBJECT(a3)); @@ -986,21 +997,24 @@ if (!path) return NULL; - for (l = _e_apps_list; l; l = l->next) - { - E_App *a; + if (_e_apps_list) + { + for (l = _e_apps_list; l; l = l->next) + { + E_App *a; - a = l->data; - if (a->path) - { - if (!strcmp(a->path, path)) - { -// _e_apps_list = evas_list_remove_list(_e_apps_list, l); -// _e_apps_list = evas_list_prepend(_e_apps_list, a); - return a; - } - } - } + a = l->data; + if (a->path) + { + if (!strcmp(a->path, path)) + { +// _e_apps_list = evas_list_remove_list(_e_apps_list, l); +// _e_apps_list = evas_list_prepend(_e_apps_list, a); + return a; + } + } + } + } return NULL; } @@ -1796,7 +1810,9 @@ if (a->parent) a->parent->subapps = evas_list_remove(a->parent->subapps, a); a->orig->references = evas_list_remove(a->orig->references, a); +#if ! NO_APP_LIST _e_apps_list = evas_list_remove(_e_apps_list, a); +#endif e_object_unref(E_OBJECT(a->orig)); free(a); } @@ -1848,7 +1864,9 @@ a->parent->subapps = evas_list_remove(a->parent->subapps, a); if (a->monitor) ecore_file_monitor_del(a->monitor); +#if ! NO_APP_LIST _e_apps_list = evas_list_remove(_e_apps_list, a); +#endif e_app_fields_empty(a); if (a->path) evas_stringshare_del(a->path); free(a); @@ -2143,7 +2161,9 @@ subapps = evas_list_append(subapps, a3); a2->references = evas_list_append(a2->references, a3); +#if ! NO_APP_LIST _e_apps_list = evas_list_prepend(_e_apps_list, a3); +#endif } else e_object_del(E_OBJECT(a3)); ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs