forked from enlightenment/efl
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
This commit is contained in:
parent
03e291eebb
commit
8b19e6eab1
|
@ -368,7 +368,7 @@ efreet_dirs_get(const char *key, const char *fallback)
|
|||
Eina_List *dirs = NULL;
|
||||
const char *path;
|
||||
char *tmp, *s, *p;
|
||||
char ts[PATH_MAX];
|
||||
// char ts[PATH_MAX];
|
||||
size_t len;
|
||||
|
||||
path = getenv(key);
|
||||
|
@ -388,8 +388,9 @@ efreet_dirs_get(const char *key, const char *fallback)
|
|||
{
|
||||
// resolve path properly/fully to remove path//path2 to
|
||||
// path/path2, path/./path2 to path/path2 etc.
|
||||
if (realpath(s, ts))
|
||||
dirs = eina_list_append(dirs, (void *)eina_stringshare_add(ts));
|
||||
// if (realpath(s, ts))
|
||||
// dirs = eina_list_append(dirs, (void *)eina_stringshare_add(ts));
|
||||
dirs = eina_list_append(dirs, (void *)eina_stringshare_add(s));
|
||||
}
|
||||
|
||||
s = ++p;
|
||||
|
@ -399,8 +400,9 @@ efreet_dirs_get(const char *key, const char *fallback)
|
|||
{
|
||||
// resolve path properly/fully to remove path//path2 to
|
||||
// path/path2, path/./path2 to path/path2 etc.
|
||||
if (realpath(s, ts))
|
||||
dirs = eina_list_append(dirs, (void *)eina_stringshare_add(ts));
|
||||
// if (realpath(s, ts))
|
||||
// dirs = eina_list_append(dirs, (void *)eina_stringshare_add(ts));
|
||||
dirs = eina_list_append(dirs, (void *)eina_stringshare_add(s));
|
||||
}
|
||||
|
||||
return dirs;
|
||||
|
|
|
@ -803,9 +803,10 @@ Efreet_Desktop *
|
|||
efreet_cache_desktop_find(const char *file)
|
||||
{
|
||||
Efreet_Cache_Desktop *cache;
|
||||
char rp[PATH_MAX];
|
||||
// char rp[PATH_MAX];
|
||||
const char *rp = file;
|
||||
|
||||
if (!realpath(file, rp)) return NULL;
|
||||
// if (!realpath(file, rp)) return NULL;
|
||||
|
||||
if (!efreet_cache_check(&desktop_cache, efreet_desktop_cache_file(), EFREET_DESKTOP_CACHE_MAJOR)) return NULL;
|
||||
|
||||
|
|
|
@ -238,11 +238,12 @@ EAPI Efreet_Desktop *
|
|||
efreet_desktop_uncached_new(const char *file)
|
||||
{
|
||||
Efreet_Desktop *desktop = NULL;
|
||||
char rp[PATH_MAX];
|
||||
// char rp[PATH_MAX];
|
||||
const char *rp = file;
|
||||
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(file, NULL);
|
||||
|
||||
if (!realpath(file, rp)) return NULL;
|
||||
// if (!realpath(file, rp)) return NULL;
|
||||
if (!ecore_file_exists(rp)) return NULL;
|
||||
|
||||
desktop = NEW(Efreet_Desktop, 1);
|
||||
|
@ -1036,9 +1037,10 @@ efreet_desktop_changes_listen_recursive(const char *path)
|
|||
static void
|
||||
efreet_desktop_changes_monitor_add(const char *path)
|
||||
{
|
||||
char rp[PATH_MAX];
|
||||
// char rp[PATH_MAX];
|
||||
const char *rp = path;
|
||||
|
||||
if (!realpath(path, rp)) return;
|
||||
// if (!realpath(path, rp)) return;
|
||||
if (eina_hash_find(change_monitors, rp)) return;
|
||||
eina_hash_add(change_monitors, rp,
|
||||
ecore_file_monitor_add(rp,
|
||||
|
|
|
@ -852,9 +852,10 @@ efreet_icon_changes_listen(void)
|
|||
static void
|
||||
efreet_icon_changes_monitor_add(const char *path)
|
||||
{
|
||||
char rp[PATH_MAX];
|
||||
|
||||
if (!realpath(path, rp)) return;
|
||||
// char rp[PATH_MAX];
|
||||
// if (!realpath(path, rp)) return;
|
||||
const char *rp = path;
|
||||
|
||||
if (!ecore_file_is_dir(rp)) return;
|
||||
if (eina_hash_find(change_monitors, rp)) return;
|
||||
eina_hash_add(change_monitors, rp,
|
||||
|
@ -871,7 +872,8 @@ efreet_icon_changes_monitor_add(const char *path)
|
|||
if (!it) return;
|
||||
EINA_ITERATOR_FOREACH(it, ent)
|
||||
{
|
||||
if (!realpath(ent, rp)) continue;
|
||||
rp = ent;
|
||||
// if (!realpath(ent, rp)) continue;
|
||||
if (!ecore_file_is_dir(rp)) continue;
|
||||
eina_hash_add(change_monitors, rp,
|
||||
ecore_file_monitor_add(rp,
|
||||
|
|
|
@ -1537,18 +1537,19 @@ efreet_menu_merge(Efreet_Menu_Internal *parent, Efreet_Xml *xml, const char *pat
|
|||
{
|
||||
Efreet_Xml *merge_xml;
|
||||
Efreet_Menu_Internal *internal;
|
||||
char rp[PATH_MAX];
|
||||
// char rp[PATH_MAX];
|
||||
char *rp = path;
|
||||
|
||||
if (!parent || !xml || !path) return 0;
|
||||
|
||||
/* do nothing if the file doesn't exist */
|
||||
if (!ecore_file_exists(path)) return 1;
|
||||
|
||||
if (!realpath(path, rp))
|
||||
{
|
||||
INF("efreet_menu_merge() unable to get real path for %s", path);
|
||||
return 0;
|
||||
}
|
||||
// if (!realpath(path, rp))
|
||||
// {
|
||||
// INF("efreet_menu_merge() unable to get real path for %s", path);
|
||||
// return 0;
|
||||
// }
|
||||
|
||||
/* don't merge the same path twice */
|
||||
if (eina_hash_find(efreet_merged_menus, rp))
|
||||
|
|
Loading…
Reference in New Issue