summaryrefslogtreecommitdiff
path: root/src/bin/efreet/efreetd_cache.c (follow)
AgeCommit message (Collapse)Author
2019-05-22include evil_private.h in last files, and disable symbolic links on Windows ↵Vincent Torri
in a couple of files Test Plan: compilation Reviewers: zmike, raster, cedric Reviewed By: zmike Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8933
2017-07-23efreetd cache - fix leak of strbuf when error conditions abort saveCarsten Haitzler (Rasterman)
fix CID 1374951
2017-07-23efreetd cache - handle queue case leaking strbufCarsten Haitzler (Rasterman)
fix CID 1374954
2017-05-12efreet: Fix failure to save list data to outputBryce Harrington
Summary: This fixes a typo in the fix 55676b33, which introduced an invalid early return from the save_list function, preventing it from outputing the list data to the file. @fix CID1375005, CID1375004 Reviewers: jpeg Reviewed By: jpeg Subscribers: stefan_schmidt, cedric, jpeg Differential Revision: https://phab.enlightenment.org/D4873
2017-05-11efreet: free the allocated buffer before returningStefan Schmidt
This fixes the commit 169a08c03a6a7270e185bda85d4ab9afd9063c8e (efreetd: BSD optimizations). Coverity rightly pointed out six different leaks of various buffers on error paths. CID: 1374949 1374950 1374951 1374952 1374953 1374954
2017-05-10efreetd: BSD optimizations.Al Poole
Summary: Related to ticket T5475. Reviewers: raster, cedric Subscribers: jpeg, cedric, raster Differential Revision: https://phab.enlightenment.org/D4865 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-04-23efreetd - make efreetd use eio and not ecore_file_monitor for monitoringCarsten Haitzler (Rasterman)
this should fix T5130 - freebsd's efreetd polling regularly @fix
2017-02-09efreetd cache - use eina home env get to centralize homedir fetchingCarsten Haitzler (Rasterman)
this cleans up and improves a getenv that should really use eina
2016-08-23efreet - save about 240-300k or so of memory used by efreet mimeCarsten Haitzler (Rasterman)
so efreet mime was loading a bunch of mime type info files, parsing them on startup and allocating memory to store all this mime info - globs, mimetype strings and more. all a big waste of memory as its allocated on the heap per process where its the SAME data files loaded every time. so make an efreet mime cache file and a tool to create it from mime files. mmap this file with all the hashes/strings in it so all that data is mmaped once in memory and shared between all processes and it is only paged in on demand - as actually read/needed so if your process doesnt need to know about mime stuff.. it wont touch it anyway. this saves about 240-300k or so of memory in my tests. this has not covered the mime MAGIC files which still consume memory and are on the heap. this is more complex so it will take more time to come up with a nice file format for the data that is nicely mmaped etc. @optimize
2016-05-02Revert "efreetd - reduce memory usage by using stringshare much more"Mike Blumenkrantz
partially reverts e4d815dc48c660a336670ec3cc67e6becbdcacfc this caused efreetd to crash almost immediately due to non-stringshared strings being used in a stringshare-only hash data descriptor
2016-04-23efreetd - reduce memory usage by using stringshare much moreCarsten Haitzler (Rasterman)
lots of long paths for monitoring file paths for icons etc. are in memory for efreetd. this reduces that memory by sharing them much more. @optimization
2016-04-08efreet: fix tmp file/dir/log handling to not leave a mess and workCarsten Haitzler (Rasterman)
so efreets tmp file/cache/log file handling was broken, using filenames in tmp and renaming them to a caceh dir that can be on different filesystems. also log file should have been in a tmp dir ... and subsidrs cache didnt get renamed properly at all and thus not updated. @fix
2015-12-23efreetd: send ipc for EFREET_EVENT_DESKTOP_CACHE_BUILD...alwaysMike Blumenkrantz
since the conversion from dbus -> ecore-ipc, efreetd has failed to notify when a cache build has completed, instead only sending the current state of the desktop cache: not built fix T2733 @fix
2015-12-02fix efreetd to scan more subdirs for desktop and icon filesCarsten Haitzler (Rasterman)
we miss desktop files for apps and stuff because we dont monitor too deep a tree. this ups our tree depth to 10 levels. @fix
2015-12-02efreet desktop tracking - fix monitoring of dirs of custom desktopsCarsten Haitzler (Rasterman)
@fix this is wrong - start monitoring every/any dir in which a desktop file exists that we load a desktop file from. imagine you browse directories in efm with lots of desktop files in them - we end up monitoring lots of directories that we then rememebr and don't un-monitor. this disables monitoring of dirs from which we load a .desktop file from to fix this.
2015-11-02efreet - fix efreetd to not exit on $home being in extra app dirsCarsten Haitzler (Rasterman)
if a client added $home in the efreet extra desktops dirs, then efreetd would detect and nuke cache, exit, causing a restart cycle forever. this makes efreet simply ignore the errant dir so it can keep working. @fix
2015-10-19efreet: use eina_file_mkstemp() for portability and fix a bug on WindowsVincent Torri
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-06-24efl - efreetd service move from dbus session bus to ecore ipcCarsten Haitzler (Rasterman)
this fixes warnings about no efreet dbus session bus in non session environments as brought up on the mailing lists with: Subject: Re: [E-devel] [EGIT] [core/efl] master 01/01: edje: unset efreet cache update flag to prevent dbus connections this moves all of efreetd client and server to ecore ipc, with client auto-launching efreetd if not found as a service and trying for up to 500ms to connect. efreetd times out on last connection or no connections after 10sec so it wont hang around forever if not in use. it seems to work in my testing, so let me know if there is an issue. @fix
2015-04-14efreetd - cache - mark cd as const as it isnt needing a free on returnCarsten Haitzler (Rasterman)
2015-04-13efreetd: If we fail to allocate space for subdir_cache, then get outChris Michael
Summary: Fix coverity CID1294212 (potential Null pointer dereference) as the alloc for subdir_cache Could fail, however if it does we Were still trying to use it. In the case that it fails, ERR msg and return. @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-13efreed cache - fix coverity warning on rm cleanup on sanity checkCarsten Haitzler (Rasterman)
sanity check didnt check return value of ecore_file_recursive_rm(). do that. coverity should be happy now.
2015-04-13efreetd - fix loading of extra_icons.dirs and icon.exts to not lose charCarsten Haitzler (Rasterman)
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-13efreetd - startup slowness fix for recursing directoriesCarsten Haitzler (Rasterman)
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-12efreetd - improve sanity checking for recursive icon monitoringCarsten Haitzler (Rasterman)
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-09efreetd: temporarily blacklist saving and monitoring root directoryMike Blumenkrantz
ref T2280
2015-04-01efreetd - cache - fix handling a text index file with 0 length linesCarsten Haitzler (Rasterman)
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
2013-12-05efreet - fix recusrion checks need to pop as well as push.Carsten Haitzler (Rasterman)
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-04efreet - protect efreetd from recursing too far to save overhead and memCarsten Haitzler (Rasterman)
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-04efreet: Create stack at start of recursionSebastian Dransfeld
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-11-27recursive monitoring and scanning fix for icons and desktop filesCarsten Haitzler (Rasterman)
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-06-21efreet: Create cache dir in efreet_cache_initSebastian Dransfeld
efreetd used efreet functions before efreet init which fails.
2013-06-20efreet: Low priority for cache rebuildSebastian Dransfeld
2013-01-09efl/efreet: move efreet_{icon,desktop}_cache_create under MODULE_ARCHLucas De Marchi
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-04efl/efreet: use eina_prefix, kill one TODO item.Gustavo Sverzut Barbieri
SVN revision: 82219
2012-12-29efl: merge efreet.Gustavo Sverzut Barbieri
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