englebass pushed a commit to branch master.
commit 74e62b2d32e13e3bc067e48500d70f9bbd78d22c
Author: Sebastian Dransfeld <[email protected]>
Date: Wed Mar 20 12:21:15 2013 +0100
Only search for theme once
Efreet uses one cache file for one theme. So by cycling themes we blow
the cache, and thus slowing things down considerably. We should find one
theme, and then stick with it.
---
src/bin/media.c | 34 ++++++++++++++++++++--------------
1 file changed, 20 insertions(+), 14 deletions(-)
diff --git a/src/bin/media.c b/src/bin/media.c
index 174cbaf..a2fe47f 100644
--- a/src/bin/media.c
+++ b/src/bin/media.c
@@ -194,24 +194,30 @@ _type_thumb_init(Evas_Object *obj)
sd->ih = 64;
if ((sd->realf) && (sd->realf[0] != '/'))
{
- Efreet_Icon_Theme *theme;
- const char *icon_theme = NULL, *fl;
-
- theme = efreet_icon_theme_find(getenv("E_ICON_THEME"));
- if (!theme)
+ /* TODO: Listen for theme cache changes */
+ static const char *icon_theme = NULL;
+ const char *fl;
+
+ if (!icon_theme)
{
- const char **itr;
- static const char *themes[] = {
- "gnome", "Human", "oxygen", "hicolor", NULL
- };
- for (itr = themes; *itr; itr++)
+ Efreet_Icon_Theme *theme;
+
+ theme = efreet_icon_theme_find(getenv("E_ICON_THEME"));
+ if (!theme)
{
- theme = efreet_icon_theme_find(*itr);
- if (theme) break;
+ const char **itr;
+ static const char *themes[] = {
+ "Human", "oxygen", "gnome", "hicolor", NULL
+ };
+ for (itr = themes; *itr; itr++)
+ {
+ theme = efreet_icon_theme_find(*itr);
+ if (theme) break;
+ }
}
+ if (theme)
+ icon_theme = eina_stringshare_add(theme->name.internal);
}
- if (theme)
- icon_theme = eina_stringshare_add(theme->name.internal);
fl = efreet_icon_path_find(icon_theme, sd->realf, sd->iw);
ethumb_client_file_set(et_client, fl, NULL);
}
--
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar