Commit Graph

14 Commits

Author SHA1 Message Date
Carsten Haitzler d08bb74255 eet - optimize eet dictionary building
this massively speeds up efreet's icon cache building for huge icon
themes... in my nasty test case of some insanely huge icon themes that
have like 50,000 - 100,000 files... each - and multiple where the icon
cache has to scan all of them and build the cache files... i see a
speedup of going from 80 seconds to build down to 15-16 seconds. so
over 5 times faster.

This builds the dictionary in a temporary eina superfast string hash
in ram and then just before writing flattens it out into a regular eet
dict format.

@opt
2021-10-23 12:15:17 +01:00
Carsten Haitzler 61be4f02bf eet dict+ data read - move rw lock to ourside decode for speed read
on read/decode we can avoid lots of little locks and unlocked by
having the rwlock go to the outside and a single lock+unlock (read) on
the dictionary. it blocks for longer by has less atomics/fence points
as a result and thus decodes faster where changes that we are writing
while decoding is insanely low so no point worrying here.
2019-08-11 12:47:31 +01:00
Jaehyun Cho 94be8a88d3 eet_dictionary: remove dead code
If index value is not -1, then eet_dictionary_string_add() returns.
Therefore, it does not need to check the index value after that.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D7922
2019-02-13 16:37:10 -08:00
Carsten Haitzler e68a952b8c eet - dictorinary - tidy up code to be easier to read
more compact so less scrolling - easier to read.
2018-11-21 13:37:16 +00:00
Carsten Haitzler 61109729fa eet dict - remove redundant check of len, str and possibly strcmp
aim for small speedups.
2018-11-21 13:37:16 +00:00
Carsten Haitzler c0d6cbab97 eet - dictionary - use rwlocks instead of spinlocks - better contention
if the dict is contended on by lots of threads then a spinlock really
makes it slow. a rwlock gets about 1.5-2x speedup depending on
arch/thread count.

@optimize
2018-11-21 13:37:16 +00:00
Stefan Schmidt a65c531429 eet_dictionary: Remove now unused variable
Since 123bdc4342 found is now longer used here.
Remove it.
2014-08-27 16:40:16 +02:00
Carsten Haitzler 123bdc4342 eet dictionary - remove impossible code
CID 1039464 knows full well our comments there are right - so remove
pointless code
2014-08-27 12:12:40 +09:00
Vorobiov Vitalii c3bee34c3c eet: Stopped SPANKing the naughty programmer while deleting dictionary.
Function edje_edit_save_all cause lots of SPANK SPANK, because
eet_dictionary_free is trying to delete string that is actually not a stringshare.

Reviewers: cedric, seoz, raster

Reviewed By: cedric

CC: reutskiy.v.v, cedric

Differential Revision: https://phab.enlightenment.org/D322

Signed-off-by: Cedric Bail <cedric.bail@samsung.com>
2013-11-07 17:58:47 +09:00
Cedric Bail b9d8a7af3a eet: use Eina_Spinlock instead of Eina_Lock for Eet_Dictionary. 2013-10-11 11:08:17 +09:00
Cedric BAIL 5465eb3acc eet: remove use of prev to reduce memory usage (30KB on 32bits system). 2013-04-05 12:14:50 +09:00
Cedric BAIL f001cfac38 eet: do the correct math for allocation. 2013-04-05 11:50:54 +09:00
Cedric BAIL fa20ab7269 eet: another big boolean removed.
By merging all boolean in their own array I avoid loosing 2.9 bytes on
32bits and 6.9 bytes on 64bits system.
2013-04-04 12:01:07 +09:00
Vincent Torri 8abaff3bdf merge: add eet
SVN revision: 76768
2012-09-17 16:35:38 +00:00