add config for disabling delayed modules. this actually drastically

speeds up e startup - but this i mean the shelf comes up instantly
populated rather than taking 2 or 3 seconds to figure its life out.



SVN revision: 77558
This commit is contained in:
Carsten Haitzler 2012-10-07 10:01:14 +00:00
parent 7bb9376863
commit 35773a3241
8 changed files with 45 additions and 47 deletions

View File

@ -20,6 +20,7 @@ group "E_Config" struct {
value "show_desktop_icons" int: 1;
value "edge_flip_dragging" int: 0;
value "use_composite" int: 0;
value "no_module_delay" int: 1;
group "modules" list {
group "E_Config_Module" struct {
value "name" string: "wizard";

View File

@ -219,6 +219,7 @@ group "E_Config" struct {
value "powersave.extreme" double: 1200.0;
value "powersave.min" int: 0;
value "powersave.max" int: 5;
value "no_module_delay" int: 1;
group "syscon.actions" list {
group "E_Config_Syscon_Action" struct {
value "action" string: "halt";

View File

@ -212,6 +212,7 @@ group "E_Config" struct {
value "powersave.extreme" double: 1200.0;
value "powersave.min" int: 0;
value "powersave.max" int: 5;
value "no_module_delay" int: 1;
group "syscon.actions" list {
group "E_Config_Syscon_Action" struct {
value "action" string: "halt";

View File

@ -658,6 +658,7 @@ e_config_init(void)
E_CONFIG_VAL(D, T, edge_flip_dragging, INT); /**/
E_CONFIG_VAL(D, T, use_composite, INT); /**/
E_CONFIG_VAL(D, T, language, STR); /**/
E_CONFIG_VAL(D, T, no_module_delay, INT); /**/
E_CONFIG_VAL(D, T, desklock_language, STR); /**/
E_CONFIG_LIST(D, T, modules, _e_config_module_edd); /**/
E_CONFIG_LIST(D, T, font_fallbacks, _e_config_font_fallback_edd); /**/

View File

@ -66,6 +66,7 @@ struct _E_Config
int show_desktop_icons; // GUI
int edge_flip_dragging; // GUI
int use_composite; // GUI
int no_module_delay; // GUI
const char *language; // GUI
const char *desklock_language; // GUI
Eina_List *modules; // GUI

View File

@ -80,9 +80,9 @@ static void e_gadcon_layout_pack_aspect_pad_set(Evas_Object
static void e_gadcon_layout_unpack(Evas_Object *obj);
static void _e_gadcon_provider_populate_request(E_Gadcon *gc, const E_Gadcon_Client_Class *cc);
static void _e_gadcon_provider_populate_unrequest(const E_Gadcon_Client_Class *cc);
static Eina_Bool _e_gadcon_provider_populate_idler(void *data);
static void _e_gadcon_event_populate_free(void *data __UNUSED__, void *event);
static Eina_Bool _e_gadcon_custom_populate_idler(void *data);
static void _e_gadcon_provider_populate_job(void *data);
static void _e_gadcon_event_populate_free(void *data __UNUSED__, void *event);
static void _e_gadcon_custom_populate_job(void *data);
static int _e_gadcon_location_change(E_Gadcon_Client *gcc, E_Gadcon_Location *src, E_Gadcon_Location *dst);
@ -190,9 +190,9 @@ static Eina_Hash *providers = NULL;
static Eina_List *providers_list = NULL;
static Eina_List *gadcons = NULL;
static Eina_List *dummies = NULL;
static Ecore_Idler *populate_idler = NULL;
static Ecore_Job *populate_job = NULL;
static Eina_List *custom_populate_requests = NULL;
static Ecore_Idler *custom_populate_idler = NULL;
static Ecore_Job *custom_populate_job = NULL;
static Eina_List *gadcon_locations = NULL;
static Ecore_Event_Handler *_module_init_end_handler = NULL;
static Eina_Bool _modules_loaded = EINA_FALSE;
@ -232,16 +232,16 @@ e_gadcon_init(void)
EINTERN int
e_gadcon_shutdown(void)
{
if (populate_idler)
if (populate_job)
{
ecore_idler_del(populate_idler);
populate_idler = NULL;
ecore_job_del(populate_job);
populate_job = NULL;
}
custom_populate_requests = eina_list_free(custom_populate_requests);
if (custom_populate_idler)
if (custom_populate_job)
{
ecore_idler_del(custom_populate_idler);
custom_populate_idler = NULL;
ecore_job_del(custom_populate_job);
custom_populate_job = NULL;
}
_modules_loaded = EINA_FALSE;
if (_module_init_end_handler)
@ -354,10 +354,10 @@ e_gadcon_custom_new(E_Gadcon *gc)
gadcons = eina_list_append(gadcons, gc);
if (!custom_populate_idler)
if (!custom_populate_job)
{
custom_populate_idler =
ecore_idler_add(_e_gadcon_custom_populate_idler, NULL);
custom_populate_job =
ecore_job_add(_e_gadcon_custom_populate_job, NULL);
}
if (!eina_list_data_find(custom_populate_requests, gc))
custom_populate_requests = eina_list_append(custom_populate_requests, gc);
@ -383,10 +383,10 @@ e_gadcon_custom_populate_request(E_Gadcon *gc)
E_OBJECT_TYPE_CHECK(gc, E_GADCON_TYPE);
if (!gc->custom) return;
if (!custom_populate_idler)
if (!custom_populate_job)
{
custom_populate_idler =
ecore_idler_add(_e_gadcon_custom_populate_idler, NULL);
custom_populate_job =
ecore_job_add(_e_gadcon_custom_populate_job, NULL);
}
if (!eina_list_data_find(custom_populate_requests, gc))
custom_populate_requests = eina_list_append(custom_populate_requests, gc);
@ -5514,15 +5514,14 @@ _e_gadcon_event_populate_free(void *data __UNUSED__, void *event)
free(ev);
}
static Eina_Bool
_e_gadcon_custom_populate_idler(void *data __UNUSED__)
static void
_e_gadcon_custom_populate_job(void *data __UNUSED__)
{
const E_Gadcon_Client_Class *cc;
E_Config_Gadcon_Client *cf_gcc;
const Eina_List *l;
E_Gadcon *gc;
if (!_modules_loaded) return EINA_TRUE;
#ifndef E17_RELEASE_BUILD
static Eina_Bool first = EINA_TRUE;
if (first)
@ -5551,24 +5550,19 @@ _e_gadcon_custom_populate_idler(void *data __UNUSED__)
#endif
if (!custom_populate_requests)
{
custom_populate_idler = NULL;
custom_populate_job = NULL;
#ifndef E17_RELEASE_BUILD
first = EINA_FALSE;
#endif
return ECORE_CALLBACK_CANCEL;
}
return ECORE_CALLBACK_RENEW;
}
static Eina_Bool
_e_gadcon_provider_populate_idler(void *data __UNUSED__)
static void
_e_gadcon_provider_populate_job(void *data __UNUSED__)
{
E_Gadcon_Client_Class *cc;
Eina_List *l;
E_Gadcon *gc;
Eina_Bool cont = EINA_FALSE;
if (!_modules_loaded) return EINA_TRUE;
#ifndef E17_RELEASE_BUILD
static Eina_Bool first = EINA_TRUE;
@ -5586,12 +5580,6 @@ _e_gadcon_provider_populate_idler(void *data __UNUSED__)
}
EINA_LIST_FREE(gc->populate_requests, cc)
{
if (x)
{
cont = EINA_TRUE;
e_gadcon_layout_thaw(gc->o_container);
goto out;
}
#ifndef E17_RELEASE_BUILD
if (first) e_main_ts(cc->name);
#endif
@ -5618,18 +5606,16 @@ _e_gadcon_provider_populate_idler(void *data __UNUSED__)
if (freeze) e_gadcon_layout_thaw(gc->o_container);
if (x) _e_gadcon_event_populate(gc);
}
out:
//out:
#ifndef E17_RELEASE_BUILD
if (first)
e_main_ts("gadcon populate idler end");
#endif
if (!cont)
populate_idler = NULL;
populate_job = NULL;
#ifndef E17_RELEASE_BUILD
first = EINA_FALSE;
#endif
return cont;
}
static void
@ -5637,8 +5623,8 @@ _e_gadcon_provider_populate_request(E_Gadcon *gc, const E_Gadcon_Client_Class *c
{
if (eina_list_data_find(gc->populate_requests, cc)) return;
gc->populate_requests = eina_list_append(gc->populate_requests, cc);
if (!populate_idler)
populate_idler = ecore_idler_add(_e_gadcon_provider_populate_idler, NULL);
if (populate_job) ecore_job_del(populate_job);
populate_job = ecore_job_add(_e_gadcon_provider_populate_job, NULL);
}
static void
@ -5652,10 +5638,10 @@ _e_gadcon_provider_populate_unrequest(const E_Gadcon_Client_Class *cc)
gc->populate_requests = eina_list_remove(gc->populate_requests, cc);
more += eina_list_count(gc->populate_requests);
}
if ((!more) && (populate_idler))
if ((!more) && (populate_job))
{
ecore_idler_del(populate_idler);
populate_idler = NULL;
ecore_job_del(populate_job);
populate_job = NULL;
}
}

View File

@ -78,7 +78,7 @@ e_module_all_load(void)
EINA_LIST_FOREACH(e_config->modules, l, em)
{
if (!em) continue;
if ((em->delayed) && (em->enabled))
if ((em->delayed) && (em->enabled) & (!e_config->no_module_delay))
{
if (!_e_module_idler)
_e_module_idler = ecore_idle_enterer_add(_e_module_cb_idler, NULL);

View File

@ -10,6 +10,7 @@ struct _E_Config_Dialog_Data
{
double framerate;
int priority;
int module_delay;
int cache_flush_poll_interval;
double font_cache;
double image_cache;
@ -47,6 +48,7 @@ _create_data(E_Config_Dialog *cfd __UNUSED__)
if (!cfdata) return NULL;
cfdata->framerate = e_config->framerate;
cfdata->priority = e_config->priority;
cfdata->module_delay = !e_config->no_module_delay;
cfdata->font_cache = ((double)e_config->font_cache / 1024);
cfdata->image_cache = ((double)e_config->image_cache / 1024);
cfdata->edje_cache = e_config->edje_cache;
@ -73,6 +75,7 @@ _basic_apply(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
e_config->edje_collection_cache = cfdata->edje_collection_cache;
edje_frametime_set(1.0 / e_config->framerate);
e_config->priority = cfdata->priority;
e_config->no_module_delay = !cfdata->module_delay;
ecore_exe_run_priority_set(e_config->priority);
e_canvas_recache();
e_config_save_queue();
@ -89,7 +92,8 @@ _basic_check_changed(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfda
(e_config->image_cache != (cfdata->image_cache * 1024)) ||
(e_config->edje_cache != cfdata->edje_cache) ||
(e_config->edje_collection_cache != cfdata->edje_collection_cache) ||
(e_config->priority != cfdata->priority));
(e_config->priority != cfdata->priority) ||
(e_config->no_module_delay != (!cfdata->module_delay)));
}
static Evas_Object *
@ -106,12 +110,15 @@ _basic_create(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dialog_Data
&(cfdata->framerate), NULL, 100);
e_widget_list_object_append(ol, ob, 1, 0, 0.5);
ob = e_widget_label_add(evas, _("Applications priority"));
ob = e_widget_label_add(evas, _("Application priority"));
e_widget_list_object_append(ol, ob, 1, 1, 0.5);
ob = e_widget_slider_add(evas, 1, 0, "%1.0f", 0, 19, 1, 0, NULL,
&(cfdata->priority), 100);
e_widget_list_object_append(ol, ob, 1, 0, 0.5);
ob = e_widget_check_add(evas, _("Allow module load delay"), &(cfdata->module_delay));
e_widget_list_object_append(ol, ob, 1, 0, 0.5);
e_widget_toolbook_page_append(otb, NULL, _("General"), ol,
1, 0, 1, 0, 0.5, 0.0);