summaryrefslogtreecommitdiff
path: root/src/lib/eina (follow)
AgeCommit message (Collapse)Author
2019-07-28eina file - stat generation inexactness supportCarsten Haitzler (Rasterman)
this is a performance optimization. it brings in a "stat generation". for now it's disabled by default so we retain previous behavior. this stops eina file from opening and stating a file every time you open ... it only does it if stat generation is off, or, if the generation changed since the last time it opened that file. this makes cache hits not have a 3 syscall cost (open+fstat+close). this optimizes that lower end of things path. but .. it comes at a cost. if the file changes before generation ticks over (which this forces to tick over every time the loop exits idle by default). now here is something to ask. 1. should we have this on by default and accept the "inexactness" since you can eina_file_statgen_next() before any call that would do i/o to force it to look at the real file stat info... 2. should we tick over every idle enter OR every N idle enters or every frame we render instead? ... i want to avoid getting a timestamp or having a timer interrupt often... so what should we do? at least this introduces the idea, some api's and an env var to turn this on. it definitely cuts down syscalls during things like creation of widdgets or objects in large batches etc.
2019-07-28Evil: remove pwd code in Evil and fix compilation failures after the removalVincent Torri
Summary: remove pwd code in Evil Test Plan: compilation Reviewers: zmike, cedric, raster Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9420
2019-07-28Eina: define EINA_HAVE_DEBUG_THREADS only if backtrace() in execinfo.h is ↵Vincent Torri
available Summary: fix compilation on systems where backtrace() in execinfo.h is not available Test Plan: compilation on Windows Reviewers: zmike, cedric, raster Reviewed By: cedric, raster Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9392
2019-07-26reduce syscalls on opening files - roll CLOEXEC into openCarsten Haitzler (Rasterman)
on linux open supports() O_CLOEXEC. add test case for this in meson build and ifdef. this rolls 3 syscalls into 1 as we were doing open, then fnctl to get and fcntl to set flags. less syscalls is a good thing as syscalls are not cheap on some architectures or systems. I've seen a syscall on 1 system take 2-3x as long as another and another syscall in the same 2 system comparison take 10x as long. depending on the syscall you may only have a budget of something like 5000 syscalls "per frame" (60fps) before you spend all of your frame time just in syscalls not doing any processing, so we should keep these down if possible and that is what this does.
2019-07-24build - cmake files - remove old seemingly unused cmake filesCarsten Haitzler (Rasterman)
2019-07-19meson: fix debug-threads optionMike Blumenkrantz
it doesn't matter if this doesn't work with eina_debug since this isn't meant to be used for that kind of debugging Reviewed-by: Cedric BAIL <cedric.bail@free.fr> Differential Revision: https://phab.enlightenment.org/D9359
2019-07-18Eina vpath: remove support of ~username vpath on WindowsVincent Torri
On Windows, one must be in kernel mode to obtain informations of other users Reviewed-by: Carsten Haitzler (Rasterman) <rasterman.com> Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D9339
2019-07-17eina: set EINA_VALUE_EMPTY during library init.Cedric BAIL
This is a work around compiler/linker limit on some system as reported by Romain Naour. Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Differential Revision: https://phab.enlightenment.org/D9348
2019-07-10eina/hash: add direct variants of list append/prepend functionsMike Blumenkrantz
Summary: this simplifies the process of manipulating lists inside hashes with a non-copied key @feature Depends on D9205 Reviewers: cedric Reviewed By: cedric Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9206
2019-07-03eina: add accessors for c arraysMarcel Hollerbach
This adds a new API which can be used to get access to a carray via the eina_accessor API.
2019-06-03meson: remove unneeded install: flagsMarcel Hollerbach
Summary: when install is not set, meson take the value of install_dir. So when this is removed, things will continue working correctly. Reviewers: zmike, stefan_schmidt, cedric, segfaultxavi Reviewed By: zmike Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9065
2019-05-29eina: add eina_slstr_copy_new_length.Cedric BAIL
Reviewers: SanghyeonLee, bu5hm4n, zmike, segfaultxavi, lauromoura, felipealmeida, raster Reviewed By: bu5hm4n, zmike Subscribers: #reviewers, #committers Tags: #efl Maniphest Tasks: T7832 Differential Revision: https://phab.enlightenment.org/D8800
2019-05-29eina/prefix: ignore magic files when running in treeMike Blumenkrantz
Summary: this just can't work. @fix Depends on D8951 Reviewers: cedric Reviewed By: cedric Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8952
2019-05-29eina/file: use INFO log level when eina_file_open failsMike Blumenkrantz
Summary: this function is commonly used to detect the existence of files using its return value. for this purpose, printing warnings any time the file cannot be opened is spammy and not very helpful in the context of detecting actual errors. Depends on D8950 Reviewers: devilhorns Reviewed By: devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8951
2019-05-21eina: move builtin detection to eina_config.hMarcel Hollerbach
Summary: this means we don't need to handle this in the buildtool at all. Reviewers: vtorri, zmike Reviewed By: zmike Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8553
2019-05-16Eina: replace Evil.h with evil_private.h and remove Evil.h when not necessaryVincent Torri
Test Plan: compilation Reviewers: raster, zmike, cedric Reviewed By: zmike Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8903
2019-05-12eina vpath: fix warning on Windows, as well as the public pathVincent Torri
Differential Revision: https://phab.enlightenment.org/D8866
2019-05-11eina: update vpath to also support a more classic syntax for variable.Cedric BAIL
This enable vpath to recognize also ${} as a variable. It does mimic what Efl.ViewModel provide with Efl.ViewModel.PropertyText and various other language. Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D8883
2019-05-11eina: refactor and simplify vpath.Cedric BAIL
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D8882
2019-05-09eina: always initialize all the field of Eina_Value used by Eina_Promise.Cedric BAIL
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es> Differential Revision: https://phab.enlightenment.org/D8794
2019-05-08Evil: remove wrapper around getcwd()Vincent Torri
Summary: getcwd() is declared in direct.h Test Plan: compilation Reviewers: raster, cedric, zmike Reviewed By: zmike Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8858
2019-05-07eina_file: speed up listing of directories on WindowsVincent Torri
Summary: forbid the creation of short name (legacy of DOS) Without optimisation 1. using only Win32 API, just iterating over directories (in micro seconds) : 10 files : 47 1000 files : 270 100000 files : 73227 2. using eina_file_dir_list() with a callback which does nothing : 10 files : 53 1000 files : 265 100000 files : 69624 usually there is a small overhead for eina API, which is normal With optimisation 1. using only Win32 API, just iterating over directories (in micro seconds) : 10 files : 51 1000 files : 256 100000 files : 33345 2. using eina_file_dir_list() with a callback which does nothing : 10 files : 53 1000 files : 251 100000 files : 33832 speed up with 1000 files and more. Twice faster with 100000 files Test Plan: benchmark program Reviewers: raster, cedric, zmike Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8842
2019-05-06eina: explicitly include Evil.h in eina_inline_slice.xMike Blumenkrantz
this file is included by itself (without Eina.h) so it must also include its dependency headers Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D8727
2019-05-03replace strndup with eina_strndup, remove strndup definition in evil and ↵Vincent Torri
elm_test_dnd Test Plan: compilation Reviewers: cedric, zmike, raster Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8814
2019-05-01Eina: add eina_strndup() API as inlined functionVincent Torri
this add strndup implementation that does not seg fault when string is NULL. This also implements strndup on Windows. Reviewed-by: Cedric BAIL <cedric.bail@free.fr> Differential Revision: https://phab.enlightenment.org/D8790
2019-04-30eina_unicode: return NULL if allocation failsVincent Torri
Reviewers: cedric Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8785
2019-04-27eina_vpath do not pass things through snprintf when not expected.Marcel Hollerbach
lets assume a user passes in a string like "blabla%dehydra" then %d will be resolved by snprintf. Which is probebly not what we want. This resolves this case and ensures that eina_vpath_resolve does not get piped through snprintf Reviewed-by: Dave Andreoli <dave@gurumeditation.it> Differential Revision: https://phab.enlightenment.org/D8753
2019-04-26eina: allow copy of EINA_VALUE_EMPTY type.Cedric BAIL
This is usefule to allow timeout future to be propagated through eina_future_all or eina_future_race for example. Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es> Differential Revision: https://phab.enlightenment.org/D8655
2019-04-18eina vpath - fix windows warning as simply as possibleCarsten Haitzler (Rasterman)
the warning is wrong - so keep things simple
2019-04-17eina vpath - clear up vpath to handle env vars that are too big as fatalCarsten Haitzler (Rasterman)
2019-04-17eina_vpath: port to WindowsVincent Torri
Test Plan: test example Reviewers: raster, cedric, zmike Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8633
2019-04-02docs: Fix common misspellings in H filesXavi Artigas
Fixed all appearances of words from this list in H files: https://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings/For_machines
2019-03-29eina_log: reset logging callback to default when null is set as the callbackMike Blumenkrantz
Summary: passing null here causes any log message to crash the app and is probably not the intended result Reviewers: cedric, segfaultxavi Reviewed By: cedric, segfaultxavi Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8513
2019-03-27eina: prevent double cancel of ongoing dispatched future.Cedric BAIL
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D8333
2019-03-26eina: always initialize i.Cedric BAIL
Reviewers: zmike, bu5hm4n, stefan_schmidt, devilhorns Reviewed By: devilhorns Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8451
2019-03-13eina_error: On Windows strerror_s() is the same than POSIX strerror_r()Vincent Torri
Summary: strerror_r() does not exist on Windows, but strerror_s() does Test Plan: compilation Reviewers: cedric, bu5hm4n, zmike Reviewed By: zmike Subscribers: zmike, bu5hm4n, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8279
2019-03-06eina_file: set errno on open fail for win32 buildMike Blumenkrantz
Summary: windows does not automatically set errno so we must do it ourselves @fix Depends on D8103 Reviewers: vtorri Reviewed By: vtorri Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8104
2019-03-05eina vpath - change XDG_PUBLIC_DIR to XDG_PUBLICSHARE_DIRCarsten Haitzler (Rasterman)
match the spec correctly.
2019-03-05eina vpath - document that resolved strings need to be freedCarsten Haitzler (Rasterman)
2019-03-05eina vpath - templates is not a dot dirCarsten Haitzler (Rasterman)
fix xdg Templates dir default to not be .Templates
2019-02-28Eina: implement strtod in C locale and remove linkl against msvcr100.Vincent Torri
Summary: This fixes compilation on Windows More precisely edje_cc could not compile emotion edc files, so it was a runtime problem because of msvcr100 link. Add more tests than before Test Plan: compilation Reviewers: raster Subscribers: zmike, stefan_schmidt, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7926
2019-02-28eina: Declare eina_config.h install dirLauro Moura
Meson from git complains if `install` is set but not `install_dir`. Reviewed-by: Marcel Hollerbach <marcel-hollerbach@t-online.de> Differential Revision: https://phab.enlightenment.org/D8036
2019-02-28eina: safe guard against macro expension error in EINA_*_EQStefan Schmidt
Make sure we are use doubel also also in things like EINA_DBL_EQ(a-b, x+y). Thanks to Vicent for reporting and Xavi for giving me context. Reviewed-by: Vincent Torri <vincent.torri@gmail.com> Differential Revision: https://phab.enlightenment.org/D8049
2019-02-25eina: free vpath hash on shutdownMike Blumenkrantz
Summary: this resolves a considerable number of leaks in unit tests Reviewers: bu5hm4n Reviewed By: bu5hm4n Subscribers: segfaultxavi, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8020
2019-02-01replace hton and ntoh family functions with ones defined in einaVincent Torri
Summary: This fixes especially the execution of edje_cc on Windows Test Plan: execution of edje_cc Reviewers: cedric, raster Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7834
2019-01-29eina modinfo: improve eina modinfo guide.Amitesh Singh
2019-01-28docs: Fix assorted typos in legacy documentationXavi Artigas
Samsung reported a long list of typos in our legacy docs, this fixes them.
2019-01-23eina: fix memory leak when a Eina_Value as promise is returned, but no ↵Cedric BAIL
dispatching Eina_Future is listening on it. Reviewed-by: SangHyeon Jade Lee <sh10233.lee@samsung.com> Differential Revision: https://phab.enlightenment.org/D7652
2019-01-23eina: refactor eina_value_*_new.Xavi Artigas
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es> Differential Revision: https://phab.enlightenment.org/D7701
2019-01-23eina: refactor eina_value_*_init.Xavi Artigas
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es> Differential Revision: https://phab.enlightenment.org/D7700