[epiphany] session: lower the priority of the task used to parse the session file
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] session: lower the priority of the task used to parse the session file
- Date: Wed, 19 Feb 2014 14:51:47 +0000 (UTC)
commit e63f59847eccf36101c81f32c78683b0688e0eb2
Author: Carlos Garcia Campos <cgarcia igalia com>
Date: Thu Feb 13 15:27:37 2014 +0100
session: lower the priority of the task used to parse the session file
Use a priority lower than the drawing events to make sure the main
window is shown asap at startup.
src/ephy-session.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/ephy-session.c b/src/ephy-session.c
index 9f14cc9..3fa8bc0 100644
--- a/src/ephy-session.c
+++ b/src/ephy-session.c
@@ -1309,7 +1309,10 @@ ephy_session_load_from_stream (EphySession *session,
session->priv->dont_save = TRUE;
task = g_task_new (session, cancellable, callback, user_data);
- g_task_set_priority (task, G_PRIORITY_HIGH);
+ /* Use a priority lower than drawing events (HIGH_IDLE + 20) to make sure
+ * the main window is shown as soon as possible at startup
+ */
+ g_task_set_priority (task, G_PRIORITY_HIGH_IDLE + 30);
context = session_parser_context_new (session, user_time);
parser = g_markup_parse_context_new (&session_parser, 0, context,
(GDestroyNotify)session_parser_context_free);
@@ -1451,7 +1454,10 @@ ephy_session_load (EphySession *session,
g_application_hold (G_APPLICATION (ephy_shell_get_default ()));
task = g_task_new (session, cancellable, callback, user_data);
- g_task_set_priority (task, G_PRIORITY_HIGH);
+ /* Use a priority lower than drawing events (HIGH_IDLE + 20) to make sure
+ * the main window is shown as soon as possible at startup
+ */
+ g_task_set_priority (task, G_PRIORITY_HIGH_IDLE + 30);
save_to_file = get_session_file (filename);
data = load_async_data_new (user_time);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]