[gnome-builder] app: make application startup feel faster when loading files
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] app: make application startup feel faster when loading files
- Date: Tue, 24 Jul 2018 22:14:53 +0000 (UTC)
commit 5841af6f20a36a408655a3b7c20c6acf2dd6dd4c
Author: Christian Hergert <chergert redhat com>
Date: Tue Jul 24 15:11:22 2018 -0700
app: make application startup feel faster when loading files
We can cheat and display the window sooner while the project loads so that
the user thinks things are loading faster. It's not really, we still take
about 1 second to be useful, but we shave about 400msec off the time to
first window display when used like "gnome-builder foo.c".
Potentially we can do some background loading on a thread while the window
resources are created, but that doesn't seem to be all that much savings
currently.
src/libide/application/ide-application-open.c | 8 ++++++++
1 file changed, 8 insertions(+)
---
diff --git a/src/libide/application/ide-application-open.c b/src/libide/application/ide-application-open.c
index 68919b9a9..4ef5179ad 100644
--- a/src/libide/application/ide-application-open.c
+++ b/src/libide/application/ide-application-open.c
@@ -207,6 +207,14 @@ ide_application_open_tick (IdeTask *task)
cancellable,
ide_application_open_project_cb,
g_object_ref (task));
+
+ /*
+ * We can show the window immediately, so that resources are starting
+ * to load while the project is loaded in the background. It causes some
+ * reshuffling of UI while things load, but it "feels" faster to the user
+ * even though its the same amount of time to being usable.
+ */
+ gtk_window_present (GTK_WINDOW (workbench));
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]