Commit Graph

89 Commits

Author SHA1 Message Date
Marcel Hollerbach 46d464e5bf here comes meson
a new shiny buildtool that currently completes in the total of ~ 4 min..
1 min. conf time
2:30 min. build time
Where autotools takes:
1:50 min. conf time
3:40 min. build time.

meson was taken because it went quite good for enlightenment, and is a traction gaining system that is also used by other mayor projects. Additionally, the DSL that is defined my meson makes the configuration of the builds a lot easier to read.

Further informations can be gathered from the README.meson

Right now, bindings & windows support are missing.

It is highly recommented to use meson 0.48 due to optimizations in meson
that reduced the time the meson call would need.

Co-authored-by: Mike Blumenkrantz <zmike@samsung.com>

Differential Revision: https://phab.enlightenment.org/D7012
Depends on D7011
2018-10-02 17:22:50 +02:00
Carsten Haitzler f4ce0d1b95 efreet icon cache creation binary - remove redundent check
found by PVS studio
2017-07-31 11:41:10 +09:00
Carsten Haitzler 8786449704 efreetd cache create - fix reallocs to bail on out of memory cleanly 2017-07-24 13:37:57 +09:00
Carsten Haitzler fceb86c865 efreetd cache - fix leak of strbuf when error conditions abort save
fix CID 1374951
2017-07-23 18:11:26 +09:00
Carsten Haitzler 91878f72f1 efreetd cache - handle queue case leaking strbuf
fix CID 1374954
2017-07-23 18:09:39 +09:00
Carsten Haitzler 53d6486ffa efreet icon cache create bin - check realloc results and handle
@fix
2017-07-16 15:56:02 +09:00
Carsten Haitzler fef4c2c292 efreet cache create binary - check realloc results and handle failure
@fix
2017-07-16 15:56:02 +09:00
Bryce Harrington a7c1edc44f efreet: Fix failure to save list data to output
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-12 11:08:30 +02:00
Stefan Schmidt 55676b335c efreet: free the allocated buffer before returning
This fixes the commit 169a08c03a (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-11 09:34:53 +02:00
Al Poole 169a08c03a efreetd: BSD optimizations.
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-05-10 12:26:08 -07:00
Carsten Haitzler d9ad9b585a efreetd - make efreetd use eio and not ecore_file_monitor for monitoring
this should fix T5130 - freebsd's efreetd polling regularly

@fix
2017-04-23 21:17:40 +09:00
Carsten Haitzler 39baea1053 efreet cache create - check return values of i/o funcs
this is pretty harmless but it checks these and at least reports an
error...

this fixes CID 1361941 + 1361940

@fix
2017-04-18 17:30:50 +09:00
Ivan Furs 3d6212b8f2 removing duplicates winsock2.h
Summary:
winsock2.h included in Ecore.h
But Ecore.h ' is included in
/bin/efreet/efreet_desktop_cache_create.c
src/bin/efreet/efreet_mime_cache_create.c
src/tests/ecore_con/ecore_con_test_efl_net_ip_address.c

Reviewers: NikaWhite, cedric, raster, an.kroitor

Reviewed By: raster

Subscribers: artem.popov, cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4687
2017-03-07 13:59:54 +09:00
Carsten Haitzler 015174f4a4 efreetd - remove unused var 2017-02-09 19:07:09 +09:00
Carsten Haitzler 0ea4d0d821 efreetd cache - use eina home env get to centralize homedir fetching
this cleans up and improves a getenv that should really use eina
2017-02-09 18:38:28 +09:00
Carsten Haitzler 6b090a00b6 efreetd - dont use XDG_RUNTIME_DIR or EFREET_LOG env vars for setuid
if a setuid app needs efreet - it will not be able to contact the
users' efreetd and thus may spawn it's own... and thus we cant have
this now spawned efreetd using env vars inherited from the
unpriveleged etc. user, so ignore them.
2017-02-09 18:38:28 +09:00
Sungtaek Hong 3f0963f7b0 efreet_desktop: fix potential error in efreet_desktop_cache_create
Summary:
 - old_file_ids is freed but not set as NULL.
   If it goes to error code, old_file_ids will be freed again.

Reviewers: jpeg, cedric, Hermet

Reviewed By: Hermet

Subscribers: conr2d

Differential Revision: https://phab.enlightenment.org/D4467
2016-12-08 13:26:55 +09:00
Stefan Schmidt e1fd028081 efreetd: handle invalid fd in all cases
Very unlikely that we will get a -1 when opening /dev/null but you never know
what kind of system you are running on.

CID: 1361759
2016-12-05 17:07:39 +01:00
Carsten Haitzler 561f8eaa8f efreet - save about 240-300k or so of memory used by efreet mime
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-08-23 12:04:06 +09:00
Carsten Haitzler 4a2f14638f efreetd - only open log file is env var is set to do so
set EFREETD_LOG to something to get efreetd to log. otherwise efretd
log files can end up rather larth and since they go in xdg_runtimedir
- thats mostly a ramdisk... they eat actual ram. so save a lot of
memory and only log if asked to.

@fix
2016-08-19 11:48:29 +09:00
Mike Blumenkrantz 50ab1a0e55 Revert "efreetd - reduce memory usage by using stringshare much more"
partially reverts e4d815dc48

this caused efreetd to crash almost immediately due to non-stringshared
strings being used in a stringshare-only hash data descriptor
2016-05-02 21:03:14 -04:00
Carsten Haitzler e4d815dc48 efreetd - reduce memory usage by using stringshare much more
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-23 23:07:48 +09:00
Carsten Haitzler 5e6bdd6da9 efreetd - dont use netdb.sh as per man page on windows 2016-04-08 12:57:30 +09:00
Carsten Haitzler 09435e5e81 efreet - use eina tmp dir instead of /tmp dir
use eina_environment_tmp_get() for windows
2016-04-08 12:57:30 +09:00
Carsten Haitzler 978f416b8c efreetd - fix more cache path handling to live in the cache dir
follow on fixes from 5028a88077

@fix
2016-04-08 12:41:36 +09:00
Carsten Haitzler 5028a88077 efreet: fix tmp file/dir/log handling to not leave a mess and work
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
2016-04-08 12:13:42 +09:00
Jean Guyomarc'h 4521929d69 efreet: fix undeclared function
libgen is needed on OSX because it contains the prototype
of basename() which is required in the compiling unit.
The result of basename() was therefore implicitely converted into
an integer, which could leed to subtile issues.

@fix
2016-01-07 12:03:04 +01:00
Mike Blumenkrantz 06bb13e2f8 efreetd: send ipc for EFREET_EVENT_DESKTOP_CACHE_BUILD...always
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-23 13:40:48 -05:00
Mike Blumenkrantz 56469c55d9 efreet_icon_cache_create: null theme eet file to avoid double free
@fix
2015-12-16 13:40:00 -05:00
Vincent Torri 0497b9685c efl: add binary mode to open() calls
This allows better compatibility with Windows

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-12-05 21:06:04 +01:00
Carsten Haitzler 7236343701 fix efreetd to scan more subdirs for desktop and icon files
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-02 20:53:27 +09:00
Carsten Haitzler 5263e61585 efreet desktop tracking - fix monitoring of dirs of custom desktops
@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-12-02 20:53:27 +09:00
Vincent Torri 9eef7ae287 efreet: fix warning
Commit 0cd59bb1 introduced the use of basename()
which needs libgen.h (hence winsock2.h before) on Windows.

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-09 10:25:54 -08:00
Vincent Torri a1243410a7 eina/efreet: open file with binary file on Windows
@fix

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-06 10:53:29 -08:00
Carsten Haitzler bd7ccd45b6 efreet - fix efreetd to not exit on $home being in extra app dirs
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-11-02 10:11:53 +09:00
Cedric BAIL 0cd59bb199 efreet: make sure that we use the right directory and ef for the cache. 2015-10-23 12:34:53 -07:00
Vincent Torri cb83f1477f efreet: use eina_file_mkstemp() for portability and fix a bug on Windows
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-10-19 14:48:49 -07:00
Vincent Torri 2c9848aa7e efreet: use ecore_file function instead of stat() in the icon cache code
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-10-12 17:21:59 -07:00
Vincent Torri daad69d51b efreet: eina_file_mkstemp() needs a template with an extension
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-10-12 17:21:59 -07:00
Vincent Torri c0be7c1a43 efreet: use eina_file_mkstemp() instead of mkstemp() for portability
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-10-12 17:21:59 -07:00
Vincent Torri eeb259303f Efreet: use eina_file_mkstemp() instead of mkstemp in efreetd.c 2015-07-22 09:22:02 +01:00
Daniel Kolesa e14c002aed efreetd_ipc: fix shadow warning 2015-06-29 14:28:01 +01:00
Carsten Haitzler a149ff6d79 efl -> fix possible null deref in efreetd ipc
this fixes CID 1308358
2015-06-25 11:32:58 +09:00
Carsten Haitzler 5abfefe99e efl - efreetd service move from dbus session bus to ecore ipc
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-06-24 19:28:17 +09:00
Carsten Haitzler 34bb3bb9a5 efreetd - cache - mark cd as const as it isnt needing a free on return 2015-04-14 13:52:37 +09:00
Chris Michael 4b950b55c0 efreetd: If we fail to allocate space for subdir_cache, then get out
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-13 20:29:53 -04:00
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 6b493430df efreetd - cache generators - dont unlink then rename - fix
if you unlink then rename, there is a gap between the unlink and
rename - no file is there. the point of the rename is to be atomic.
either old file OR new file. nothing in between. this fixes that race.
2015-04-13 09:15:43 +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