eina file - stat generation inexactness support

Authored by raster on Jul 28 2019, 3:51 AM.


eina file - stat generation inexactness support

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...

  1. 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.


rasterJul 28 2019, 3:51 AM
rEFL0ff42fa4e51d: elm test - set var to null to avoid warning