summaryrefslogtreecommitdiff
path: root/legacy/efreet
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2012-10-17 09:16:20 +0000
committerCarsten Haitzler <raster@rasterman.com>2012-10-17 09:16:20 +0000
commit8b19e6eab1316b5c2043da5e2e3781e031dfe428 (patch)
tree5f03dd9036cc48869f4a5595766b24b003563e67 /legacy/efreet
parent03e291eebbccf663621e5f95b72efd76a188ffb2 (diff)
disable some realpath(s) in efreet to rece syscall noise on init...
after some poking around and looking - terminology is taking about 800ms to start ... and we seem to use about 300ms or so of that time statting files and tregistering them for file monitoring (the dirs that are found there) and also handling a big batch of incoming file monitor events for some reason even tho nothing changed. this cuts down some time+noise, but we need to do a lot of work here. :( SVN revision: 78108
Diffstat (limited to 'legacy/efreet')
-rw-r--r--legacy/efreet/src/lib/efreet_base.c12
-rw-r--r--legacy/efreet/src/lib/efreet_cache.c5
-rw-r--r--legacy/efreet/src/lib/efreet_desktop.c10
-rw-r--r--legacy/efreet/src/lib/efreet_icon.c10
-rw-r--r--legacy/efreet/src/lib/efreet_menu.c13
5 files changed, 29 insertions, 21 deletions
diff --git a/legacy/efreet/src/lib/efreet_base.c b/legacy/efreet/src/lib/efreet_base.c
index ea71bf9d6f..95e6c51137 100644
--- a/legacy/efreet/src/lib/efreet_base.c
+++ b/legacy/efreet/src/lib/efreet_base.c
@@ -368,7 +368,7 @@ efreet_dirs_get(const char *key, const char *fallback)
368 Eina_List *dirs = NULL; 368 Eina_List *dirs = NULL;
369 const char *path; 369 const char *path;
370 char *tmp, *s, *p; 370 char *tmp, *s, *p;
371 char ts[PATH_MAX]; 371// char ts[PATH_MAX];
372 size_t len; 372 size_t len;
373 373
374 path = getenv(key); 374 path = getenv(key);
@@ -388,8 +388,9 @@ efreet_dirs_get(const char *key, const char *fallback)
388 { 388 {
389 // resolve path properly/fully to remove path//path2 to 389 // resolve path properly/fully to remove path//path2 to
390 // path/path2, path/./path2 to path/path2 etc. 390 // path/path2, path/./path2 to path/path2 etc.
391 if (realpath(s, ts)) 391// if (realpath(s, ts))
392 dirs = eina_list_append(dirs, (void *)eina_stringshare_add(ts)); 392// dirs = eina_list_append(dirs, (void *)eina_stringshare_add(ts));
393 dirs = eina_list_append(dirs, (void *)eina_stringshare_add(s));
393 } 394 }
394 395
395 s = ++p; 396 s = ++p;
@@ -399,8 +400,9 @@ efreet_dirs_get(const char *key, const char *fallback)
399 { 400 {
400 // resolve path properly/fully to remove path//path2 to 401 // resolve path properly/fully to remove path//path2 to
401 // path/path2, path/./path2 to path/path2 etc. 402 // path/path2, path/./path2 to path/path2 etc.
402 if (realpath(s, ts)) 403// if (realpath(s, ts))
403 dirs = eina_list_append(dirs, (void *)eina_stringshare_add(ts)); 404// dirs = eina_list_append(dirs, (void *)eina_stringshare_add(ts));
405 dirs = eina_list_append(dirs, (void *)eina_stringshare_add(s));
404 } 406 }
405 407
406 return dirs; 408 return dirs;
diff --git a/legacy/efreet/src/lib/efreet_cache.c b/legacy/efreet/src/lib/efreet_cache.c
index b3b98553ac..1af42c544e 100644
--- a/legacy/efreet/src/lib/efreet_cache.c
+++ b/legacy/efreet/src/lib/efreet_cache.c
@@ -803,9 +803,10 @@ Efreet_Desktop *
803efreet_cache_desktop_find(const char *file) 803efreet_cache_desktop_find(const char *file)
804{ 804{
805 Efreet_Cache_Desktop *cache; 805 Efreet_Cache_Desktop *cache;
806 char rp[PATH_MAX]; 806// char rp[PATH_MAX];
807 const char *rp = file;
807 808
808 if (!realpath(file, rp)) return NULL; 809// if (!realpath(file, rp)) return NULL;
809 810
810 if (!efreet_cache_check(&desktop_cache, efreet_desktop_cache_file(), EFREET_DESKTOP_CACHE_MAJOR)) return NULL; 811 if (!efreet_cache_check(&desktop_cache, efreet_desktop_cache_file(), EFREET_DESKTOP_CACHE_MAJOR)) return NULL;
811 812
diff --git a/legacy/efreet/src/lib/efreet_desktop.c b/legacy/efreet/src/lib/efreet_desktop.c
index 9293f9429f..8279a45b44 100644
--- a/legacy/efreet/src/lib/efreet_desktop.c
+++ b/legacy/efreet/src/lib/efreet_desktop.c
@@ -238,11 +238,12 @@ EAPI Efreet_Desktop *
238efreet_desktop_uncached_new(const char *file) 238efreet_desktop_uncached_new(const char *file)
239{ 239{
240 Efreet_Desktop *desktop = NULL; 240 Efreet_Desktop *desktop = NULL;
241 char rp[PATH_MAX]; 241// char rp[PATH_MAX];
242 const char *rp = file;
242 243
243 EINA_SAFETY_ON_NULL_RETURN_VAL(file, NULL); 244 EINA_SAFETY_ON_NULL_RETURN_VAL(file, NULL);
244 245
245 if (!realpath(file, rp)) return NULL; 246// if (!realpath(file, rp)) return NULL;
246 if (!ecore_file_exists(rp)) return NULL; 247 if (!ecore_file_exists(rp)) return NULL;
247 248
248 desktop = NEW(Efreet_Desktop, 1); 249 desktop = NEW(Efreet_Desktop, 1);
@@ -1036,9 +1037,10 @@ efreet_desktop_changes_listen_recursive(const char *path)
1036static void 1037static void
1037efreet_desktop_changes_monitor_add(const char *path) 1038efreet_desktop_changes_monitor_add(const char *path)
1038{ 1039{
1039 char rp[PATH_MAX]; 1040// char rp[PATH_MAX];
1041 const char *rp = path;
1040 1042
1041 if (!realpath(path, rp)) return; 1043// if (!realpath(path, rp)) return;
1042 if (eina_hash_find(change_monitors, rp)) return; 1044 if (eina_hash_find(change_monitors, rp)) return;
1043 eina_hash_add(change_monitors, rp, 1045 eina_hash_add(change_monitors, rp,
1044 ecore_file_monitor_add(rp, 1046 ecore_file_monitor_add(rp,
diff --git a/legacy/efreet/src/lib/efreet_icon.c b/legacy/efreet/src/lib/efreet_icon.c
index 526e0ecdd9..b023e9caba 100644
--- a/legacy/efreet/src/lib/efreet_icon.c
+++ b/legacy/efreet/src/lib/efreet_icon.c
@@ -852,9 +852,10 @@ efreet_icon_changes_listen(void)
852static void 852static void
853efreet_icon_changes_monitor_add(const char *path) 853efreet_icon_changes_monitor_add(const char *path)
854{ 854{
855 char rp[PATH_MAX]; 855// char rp[PATH_MAX];
856 856// if (!realpath(path, rp)) return;
857 if (!realpath(path, rp)) return; 857 const char *rp = path;
858
858 if (!ecore_file_is_dir(rp)) return; 859 if (!ecore_file_is_dir(rp)) return;
859 if (eina_hash_find(change_monitors, rp)) return; 860 if (eina_hash_find(change_monitors, rp)) return;
860 eina_hash_add(change_monitors, rp, 861 eina_hash_add(change_monitors, rp,
@@ -871,7 +872,8 @@ efreet_icon_changes_monitor_add(const char *path)
871 if (!it) return; 872 if (!it) return;
872 EINA_ITERATOR_FOREACH(it, ent) 873 EINA_ITERATOR_FOREACH(it, ent)
873 { 874 {
874 if (!realpath(ent, rp)) continue; 875 rp = ent;
876// if (!realpath(ent, rp)) continue;
875 if (!ecore_file_is_dir(rp)) continue; 877 if (!ecore_file_is_dir(rp)) continue;
876 eina_hash_add(change_monitors, rp, 878 eina_hash_add(change_monitors, rp,
877 ecore_file_monitor_add(rp, 879 ecore_file_monitor_add(rp,
diff --git a/legacy/efreet/src/lib/efreet_menu.c b/legacy/efreet/src/lib/efreet_menu.c
index e612ba1a70..383ece2d0f 100644
--- a/legacy/efreet/src/lib/efreet_menu.c
+++ b/legacy/efreet/src/lib/efreet_menu.c
@@ -1537,18 +1537,19 @@ efreet_menu_merge(Efreet_Menu_Internal *parent, Efreet_Xml *xml, const char *pat
1537{ 1537{
1538 Efreet_Xml *merge_xml; 1538 Efreet_Xml *merge_xml;
1539 Efreet_Menu_Internal *internal; 1539 Efreet_Menu_Internal *internal;
1540 char rp[PATH_MAX]; 1540// char rp[PATH_MAX];
1541 char *rp = path;
1541 1542
1542 if (!parent || !xml || !path) return 0; 1543 if (!parent || !xml || !path) return 0;
1543 1544
1544 /* do nothing if the file doesn't exist */ 1545 /* do nothing if the file doesn't exist */
1545 if (!ecore_file_exists(path)) return 1; 1546 if (!ecore_file_exists(path)) return 1;
1546 1547
1547 if (!realpath(path, rp)) 1548// if (!realpath(path, rp))
1548 { 1549// {
1549 INF("efreet_menu_merge() unable to get real path for %s", path); 1550// INF("efreet_menu_merge() unable to get real path for %s", path);
1550 return 0; 1551// return 0;
1551 } 1552// }
1552 1553
1553 /* don't merge the same path twice */ 1554 /* don't merge the same path twice */
1554 if (eina_hash_find(efreet_merged_menus, rp)) 1555 if (eina_hash_find(efreet_merged_menus, rp))