15 #include <Ecore_File.h>
17 #define EFREET_MODULE_LOG_DOM /* no logging in this file */
20 #include "efreet_private.h"
21 #include "efreet_cache_private.h"
26 dump(Efreet_Icon_Theme *theme)
29 unsigned int count = 0;
34 start = ecore_time_get();
35 ef = eet_open(efreet_icon_cache_file(theme->name.internal), EET_FILE_MODE_READ);
36 printf("open: %s %f\n", theme->name.internal, ecore_time_get() - start);
38 start = ecore_time_get();
39 keys = eet_list(ef, "*", &num);
40 printf("list: %s %f\n", theme->name.internal, ecore_time_get() - start);
43 start = ecore_time_get();
44 for (i = 0; i < num; i++)
46 Efreet_Cache_Icon *icon;
49 icon = eet_data_read(ef, efreet_icon_edd(), keys[i]);
52 for (j = 0; j < icon->icons_count; ++j)
53 count += icon->icons[j]->paths_count;
57 start = ecore_time_get() - start;
59 printf("read: %s - %u paths (time: %f) (avg %f)\n", theme->name.internal, count, start, avg);
65 main(int argc, char **argv)
69 Efreet_Icon_Theme *theme;
72 efreet_cache_update = 0;
74 if (!efreet_init()) return -1;
76 theme_ef = eet_open(efreet_icon_theme_cache_file(), EET_FILE_MODE_READ);
77 if (!theme_ef) return -1;
81 for (i = 1; i < argc; i++)
83 theme = eet_data_read(theme_ef, efreet_icon_theme_edd(EINA_FALSE), argv[i]);
84 if (theme) l = eina_list_append(l, theme);
92 keys = eet_list(theme_ef, "*", &num);
95 for (i = 0; i < num; i++)
97 theme = eet_data_read(theme_ef, efreet_icon_theme_edd(EINA_FALSE), keys[i]);
98 if (theme) l = eina_list_append(l, theme);
104 EINA_LIST_FREE(l, theme)
111 eina_list_free(theme->paths);
112 eina_list_free(theme->inherits);
113 EINA_LIST_FREE(theme->directories, data)