From f06e272ea77b42466b113d5dc86b3d72d01695b1 Mon Sep 17 00:00:00 2001 From: Soren Sandmann Date: Wed, 9 Aug 2006 03:05:34 +0000 Subject: [PATCH] Make the load_file() idle low priority to avoid weird toolbar flash. 2006-08-08 Soren Sandmann * sysprof.c (main): Make the load_file() idle low priority to avoid weird toolbar flash. * TODO: updates. --- ChangeLog | 7 +++++++ NEWS | 1 + README | 4 ++-- TODO | 9 +++++++++ sysprof.c | 16 ++++++++++------ 5 files changed, 29 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 011b0c8..91259df 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2006-08-08 Soren Sandmann + + * sysprof.c (main): Make the load_file() idle low priority to + avoid weird toolbar flash. + + * TODO: updates. + 2006-07-31 Paolo Borelli * sysprof.c (expand_descendants_tree): small cleanup. diff --git a/NEWS b/NEWS index 83ee20c..b0b7720 100644 --- a/NEWS +++ b/NEWS @@ -3,4 +3,5 @@ - Assign time spent in kernel to the user process responsible - New screenshot window - Device based on udev [Kristian Hoegsberg] +- Port to RHEL4 [Bastien Nocera] - Performance improvements diff --git a/README b/README index 9ac77fb..4384844 100644 --- a/README +++ b/README @@ -19,8 +19,8 @@ would be appreciated. Requirements: -- A Linux kernel version 2.6.11 or newer is required. - Unlike Sysprof 0.9, this version should work fine on SMP systems. +- A Linux kernel version 2.6.9 or newer, compiled with profiling + support, is required. - GTK+ 2.6.0 or newer is required diff --git a/TODO b/TODO index b093812..41ed8f1 100644 --- a/TODO +++ b/TODO @@ -537,6 +537,15 @@ Later: DONE: +* When you load a file from the commandline, there is a weird flash of the toolbar. + What's going on is this: + - this file is loaded into a tree model + - the tree model is set for the function list + - this causes the selection changed signal to be emitted + - the callback for that signal process updates + - somehow in that update process, the toolbar flashes. + - turns out to be a gtk+ issue: 350517 + - screenshot window must be cleared when you press start. - Formats should become first-class, stand-alone objects that offers diff --git a/sysprof.c b/sysprof.c index 1667365..481fcd3 100644 --- a/sysprof.c +++ b/sysprof.c @@ -1153,7 +1153,7 @@ on_object_selection_changed (GtkTreeSelection *selection, gpointer data) { Application *app = data; - + set_busy (app->main_window, TRUE); gdk_window_process_all_updates (); /* Display updated selection */ @@ -1528,7 +1528,7 @@ load_file (gpointer data) Application *app = file_open_data->app; GError *err = NULL; Profile *profile; - + set_busy (app->main_window, TRUE); profile = profile_load (filename, &err); @@ -1560,8 +1560,10 @@ main (int argc, #if 0 /* FIXME: enable this when compiled against the relevant glib - * version. (The reason we want to enable it is that gslice - * caches too much memory and also confuses valgrind). + * version. The reason we want to disable it is that gslice + * - confuses valgrind + * - caches too much memory + * - is not actually faster */ g_slice_set_config (G_SLICE_CONFIG_ALWAYS_MALLOC, TRUE); #endif @@ -1578,8 +1580,10 @@ main (int argc, FileOpenData *file_open_data = g_new0 (FileOpenData, 1); file_open_data->filename = argv[1]; file_open_data->app = app; - - g_idle_add (load_file, file_open_data); + + /* This has to run at G_PRIORITY_LOW because of bug 350517 + */ + g_idle_add_full (G_PRIORITY_LOW, load_file, file_open_data, NULL); } gtk_main (); -- 2.7.4