On Sun, 28 Mar 2010, Enlightenment SVN wrote:
> Log: > efreet: Only read data from disk when modified what about using file monitoring for that ? Vincent > Author: englebass > Date: 2010-03-28 12:31:37 -0700 (Sun, 28 Mar 2010) > New Revision: 47539 > > Modified: > trunk/efreet/src/bin/efreet_desktop_cache_create.c > > Modified: trunk/efreet/src/bin/efreet_desktop_cache_create.c > =================================================================== > --- trunk/efreet/src/bin/efreet_desktop_cache_create.c 2010-03-28 > 19:31:26 UTC (rev 47538) > +++ trunk/efreet/src/bin/efreet_desktop_cache_create.c 2010-03-28 > 19:31:37 UTC (rev 47539) > @@ -37,15 +37,18 @@ > { > Efreet_Desktop *desk; > char *ext; > + long long mtime; > > ext = strrchr(path, '.'); > if (!ext || (strcmp(ext, ".desktop") && strcmp(ext, ".directory"))) > return 1; > - /* > - * TODO: > - * Get cached version first and check mtime. Only get uncached if we need > - * to update. > - */ > - desk = efreet_desktop_uncached_new(path); > + desk = efreet_desktop_get(path); > + if (!desk) return 1; > + mtime = ecore_file_mod_time(path); > + if (mtime != desk->load_time) > + { > + efreet_desktop_free(desk); > + desk = efreet_desktop_uncached_new(path); > + } > > if (!desk || (desk->type != EFREET_DESKTOP_TYPE_APPLICATION && > desk->type != EFREET_DESKTOP_TYPE_DIRECTORY)) > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > enlightenment-svn mailing list > enlightenment-...@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-svn > > ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel