summaryrefslogtreecommitdiff
path: root/src/bin/e_path.c
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2006-10-21 10:28:01 +0000
committerCarsten Haitzler <raster@rasterman.com>2006-10-21 10:28:01 +0000
commit580a468103fdfa8c8329d8795cb9d5c5663431d0 (patch)
tree4ff56d16ccc5702b1aa8e821cdd012667fcd00ff /src/bin/e_path.c
parent33675991507b04df8142bf687bcb7d4d651c1c95 (diff)
been doing instrumentation. i'm cuttong down on startup time - a little here
and there - noticing lots of excessive io and stat and what not junk. trimming out. SVN revision: 26729
Diffstat (limited to 'src/bin/e_path.c')
-rw-r--r--src/bin/e_path.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/bin/e_path.c b/src/bin/e_path.c
index d953f25..8ea1206 100644
--- a/src/bin/e_path.c
+++ b/src/bin/e_path.c
@@ -253,12 +253,21 @@ e_path_find(E_Path *ep, const char *file)
253 for (l = ep->default_dir_list; l; l = l->next) 253 for (l = ep->default_dir_list; l; l = l->next)
254 { 254 {
255 E_Path_Dir *epd; 255 E_Path_Dir *epd;
256 char *rp; 256// char *rp;
257 257
258 epd = l->data; 258 epd = l->data;
259 if (epd->dir) 259 if (epd->dir)
260 { 260 {
261 snprintf(buf, sizeof(buf), "%s/%s", epd->dir, file); 261 snprintf(buf, sizeof(buf), "%s/%s", epd->dir, file);
262 if (ecore_file_exists(buf))
263 {
264 if (evas_hash_size(ep->hash) >= 512)
265 _e_path_cache_free(ep);
266 ep->hash = evas_hash_add(ep->hash, file,
267 evas_stringshare_add(buf));
268 return evas_stringshare_add(buf);
269 }
270/*
262 rp = ecore_file_realpath(buf); 271 rp = ecore_file_realpath(buf);
263 if ((rp) && (rp[0] != 0)) 272 if ((rp) && (rp[0] != 0))
264 { 273 {
@@ -272,6 +281,7 @@ e_path_find(E_Path *ep, const char *file)
272 return evas_stringshare_add(buf); 281 return evas_stringshare_add(buf);
273 } 282 }
274 if (rp) free(rp); 283 if (rp) free(rp);
284 */
275 } 285 }
276 } 286 }
277 /* Look in the users dir list */ 287 /* Look in the users dir list */
@@ -284,6 +294,15 @@ e_path_find(E_Path *ep, const char *file)
284 if (epd->dir) 294 if (epd->dir)
285 { 295 {
286 snprintf(buf, sizeof(buf), "%s/%s", epd->dir, file); 296 snprintf(buf, sizeof(buf), "%s/%s", epd->dir, file);
297 if (ecore_file_exists(buf))
298 {
299 if (evas_hash_size(ep->hash) >= 512)
300 _e_path_cache_free(ep);
301 ep->hash = evas_hash_add(ep->hash, file,
302 evas_stringshare_add(buf));
303 return evas_stringshare_add(buf);
304 }
305/*
287 rp = ecore_file_realpath(buf); 306 rp = ecore_file_realpath(buf);
288 if ((rp) && (rp[0] != 0)) 307 if ((rp) && (rp[0] != 0))
289 { 308 {
@@ -297,6 +316,7 @@ e_path_find(E_Path *ep, const char *file)
297 return evas_stringshare_add(buf); 316 return evas_stringshare_add(buf);
298 } 317 }
299 if (rp) free(rp); 318 if (rp) free(rp);
319 */
300 } 320 }
301 } 321 }
302 return NULL; 322 return NULL;