Commit Graph

15 Commits

Author SHA1 Message Date
Carsten Haitzler 701504c7a4 efreed cache - fix coverity warning on rm cleanup on sanity check
sanity check didnt check return value of ecore_file_recursive_rm(). do
that. coverity should be happy now.
2015-04-13 09:47:24 +09:00
Carsten Haitzler e05eb13f70 efreetd - fix loading of extra_icons.dirs and icon.exts to not lose char
efreetd was losing the last char on every line of extra_icon.dirs and
icon.exts thus resulting in gradual degredation of these files as more
and more changes happen to have things like:

.jpeg
.jpe
.jp
.j
.

etc. for extension or dirs like

/home/raster/.e/e/icons
/home/raster/.e/e/icon
/home/raster/.e/e/ico
...
/home/ras
/home/ra
/home/r
...
/ho
/h
/

.. you get the idea. before long the list of extra icon dirs (and
extensions) was massigve and caued all sorts of filesystem rummaging.
this fixes that to no longer degrade these files. this also changes
their names to force new files to be used instead of the broken old
ones.
2015-04-13 09:45:29 +09:00
Carsten Haitzler cd2b3c228d efreetd - startup slowness fix for recursing directories
this fixes major slowness in things like enlightenment login. when
enlightenment starts, efreetd is started. efreetd takes a long time to
start because it is scanning lots of directories recursively. it is
early in code freeze, so i think this can go in as a fix, even though
it is more of an optimization, but as such it has a fairly major speed
impact, so i consider this fixing a core performance problem for
things like logging in. The solution is a cache file containing all
the sub directories in a directory tree. we still have to stat every
directory, but this avoids a lot of stating of all files as well and
avoids any readirs etc. so it is much faster. on an ssd this comes out
to 4 times faster for efreetd to start up. on an hdd it's about 2x
faster to start uncached.

this should bea good fix for startup times - on my systems thats a 1
second speedup on ssd (out of about 8 seconds boot time) and 3 seconds
on hdd (out of about 39 seconds boot). so w save 1 and 3 seconds
respecively in boot + login.

now can we get this to 0 or close? that's a matter of designing
something like a deferred scan + monitor add so we wait until "startup
is done" then set up in the bg for a bit. that might shave another 3
seconds off boot time for hdd's but for ssd's wil barely blip (maybe
save 0.1 sec). so leave that till normal dev mode.

@fix
2015-04-13 09:09:42 +09:00
Carsten Haitzler 44fe8b987e efreetd - improve sanity checking for recursive icon monitoring
i found my efreetd was not just monitoring a small set of dirs but
literally $HOME - recursively. this explains a lot of performance
issues i have seen on spinning hdd's vs ssd's. i never knew if was in
efreetd though... until now. for whatever reason my efret cache caused
efreet to try monitro a list like:

/
/h
/ho
/hom
/home
/home/
/home/r
... etc.

when trying to monitor something like:

/home/raster/.local/share/icons

that means it ended up trying $HOME as wellas a vast range of dirs it
just shouldn't sensibly ever try. i have no idea how my cache ended up
this way, but deleting it and re-populating it fixed it. so this ads
code to detect such insanity (as wellas give actual complaints on deep
recursion so we can see things better later). not a bug fix as such,
but a major improvement to detecting bugs which is what we want for
stability.

I also noticed that one legacy pixmaps dir is not recursively
monitored, but another is - so be consistent and recurs both.

Also apply checks to desktop file monitoring too.
2015-04-12 12:19:41 +09:00
Mike Blumenkrantz 668fcab941 efreetd: temporarily blacklist saving and monitoring root directory
ref T2280
2015-04-09 20:08:17 -04:00
Carsten Haitzler 1551268280 efreetd - cache - fix handling a text index file with 0 length lines
this fixes an efreetd cache crash where files like icon.exts might
have lines with just a newline and no extension/content on the line.

@fix
2015-04-01 20:44:57 +09:00
Carsten Haitzler 931d02378b efreet - fix recusrion checks need to pop as well as push.
stable release - cherry-pick me!

this fixes a lack of popping the efret recursion stack handler. this
wasn't done in 1.8 and is a bug.
2013-12-05 20:04:25 +09:00
Carsten Haitzler f6f28bf75a efreet - protect efreetd from recursing too far to save overhead and mem
an errant path made its way into my efreet cache. this had a
side-effect of causing efreetd to scan my entire $HOME recursively
to monitor everything. while the original cause was $HOME getting in,
we shouldn't have efreetd sit and consume scan all of $HOME when this
is far from a normal situation. the recursive scanning is there ot
handle some minimal levels of subdirs in app directories, but not an
entire filesystem, so this mitigates the effects of errant cache data
by limiting the amount of recursion allows for icon dirs and desktop
dirs to 8 and 3 levels respectively.
2013-12-04 20:25:57 +09:00
Sebastian Dransfeld 70474a4bc5 efreet: Create stack at start of recursion
No need to check for NULL stack, we know where we start our recursive
scan, so create the stack there.

Also fixes CID1132751 and CID1132752
2013-12-04 09:12:31 +01:00
Carsten Haitzler c69cf48746 recursive monitoring and scanning fix for icons and desktop files
this fixes T580 ... or SHOULD fix it. there is recursion detection
code now and it properly follows symlinks and dirs. it also properly
updates the file monitor tree for both icons and desktops and it only
monitors dirs, not files (as a dir picks up changes to child data).
tested and it seems not to recurse into self-referencing symlinks
(once it detects the loop) and detects changes nicely in all my tests.
2013-11-27 19:50:24 +09:00
Sebastian Dransfeld ebcd97cc93 efreet: Create cache dir in efreet_cache_init
efreetd used efreet functions before efreet init which fails.
2013-06-21 10:00:20 +02:00
Sebastian Dransfeld 58fc3a8f32 efreet: Low priority for cache rebuild 2013-06-20 13:53:54 +02:00
Lucas De Marchi 483a80be8a efl/efreet: move efreet_{icon,desktop}_cache_create under MODULE_ARCH
These binaries are called by efreetd and should be under MODULE_ARCH
dir.

And actually fix the path to efreet_desktop_cache_create that was wrong.



SVN revision: 82489
2013-01-09 22:31:59 +00:00
Gustavo Sverzut Barbieri 1eddf87965 efl/efreet: use eina_prefix, kill one TODO item.
SVN revision: 82219
2013-01-04 17:42:23 +00:00
Gustavo Sverzut Barbieri 4bc0210bd3 efl: merge efreet.
seems to be fine, pass distcheck and friends. please report.

changes:
 - documentation hierarchy fixes
 - replaced __UNUSED__ with EINA_UNUSED
 - replaced PKG_DATA_DIR with PACKAGE_DATA_DIR"/efreet"



SVN revision: 81889
2012-12-29 23:04:40 +00:00