forked from enlightenment/efl
edje: finally found why we did so many call to stat.
NOTE: I am still wondering what is the cost difference between forcing a request to eet_open and calling stat. If someone has some time to benchmark, feel free to do so and report on e-devel ml. SVN revision: 66902
This commit is contained in:
parent
8a4dfb08c1
commit
6a169575e7
|
@ -258,7 +258,11 @@
|
|||
|
||||
* Entry: Fixed undo/redo with IMF.
|
||||
|
||||
2012-01-04 Carsten Haitzler (The Rasterman)
|
||||
2012-01-04 Carsten Haitzler (The Rasterman)
|
||||
|
||||
* Add HEX, TERMINAL and PASSWORD layouts to edje
|
||||
* Add "recalc" smart callback for object size changes
|
||||
|
||||
2012-01-05 Cedric Bail
|
||||
|
||||
* Reduce call to stat during edje_object_file_set.
|
||||
|
|
|
@ -10,6 +10,7 @@ Additions:
|
|||
Improvements:
|
||||
* speedup load time of Edje file.
|
||||
* check existence of group at compile time also.
|
||||
* reduce number of call to stat during edje_object_file_set.
|
||||
|
||||
Changes since Edje 1.0.0:
|
||||
-------------------------
|
||||
|
|
|
@ -128,18 +128,11 @@ _edje_file_coll_open(Edje_File *edf, const char *coll)
|
|||
}
|
||||
|
||||
static Edje_File *
|
||||
_edje_file_open(const char *file, const char *coll, int *error_ret, Edje_Part_Collection **edc_ret)
|
||||
_edje_file_open(const char *file, const char *coll, int *error_ret, Edje_Part_Collection **edc_ret, time_t mtime)
|
||||
{
|
||||
Edje_File *edf;
|
||||
Edje_Part_Collection *edc;
|
||||
Eet_File *ef;
|
||||
struct stat st;
|
||||
|
||||
if (stat(file, &st) != 0)
|
||||
{
|
||||
*error_ret = EDJE_LOAD_ERROR_DOES_NOT_EXIST;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ef = eet_open(file, EET_FILE_MODE_READ);
|
||||
if (!ef)
|
||||
|
@ -156,7 +149,7 @@ _edje_file_open(const char *file, const char *coll, int *error_ret, Edje_Part_Co
|
|||
}
|
||||
|
||||
edf->ef = ef;
|
||||
edf->mtime = st.st_mtime;
|
||||
edf->mtime = mtime;
|
||||
|
||||
if (edf->version != EDJE_FILE_VERSION)
|
||||
{
|
||||
|
@ -262,7 +255,7 @@ open_new:
|
|||
if (!_edje_file_hash)
|
||||
_edje_file_hash = eina_hash_string_small_new(NULL);
|
||||
|
||||
edf = _edje_file_open(file, coll, error_ret, edc_ret);
|
||||
edf = _edje_file_open(file, coll, error_ret, edc_ret, st.st_mtime);
|
||||
if (!edf)
|
||||
return NULL;
|
||||
|
||||
|
|
Loading…
Reference in New Issue