Mercurial > geeqie
changeset 1735:6cae2af8fdd1
added messages for debugging startup time
author | nadvornik |
---|---|
date | Sun, 06 Sep 2009 09:08:37 +0000 |
parents | d3060e56fbf2 |
children | 8e64965c1d92 |
files | src/layout.c src/layout_util.c src/main.c src/rcfile.c |
diffstat | 4 files changed, 28 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/layout.c Sat Sep 05 13:48:21 2009 +0000 +++ b/src/layout.c Sun Sep 06 09:08:37 2009 +0000 @@ -2073,6 +2073,7 @@ GdkWindowHints hint_mask; Histogram *histogram; + DEBUG_1("%s layout_new: start", get_exec_time()); lw = g_new0(LayoutWindow, 1); if (lop) @@ -2200,6 +2201,8 @@ file_data_register_notify_func(layout_image_notify_cb, lw, NOTIFY_PRIORITY_LOW); + DEBUG_1("%s layout_new: end", get_exec_time()); + return lw; }
--- a/src/layout_util.c Sat Sep 05 13:48:21 2009 +0000 +++ b/src/layout_util.c Sun Sep 06 09:08:37 2009 +0000 @@ -1862,6 +1862,7 @@ GError *error; gint i; + DEBUG_1("%s layout_actions_setup: start", get_exec_time()); if (lw->ui_manager) return; lw->action_group = gtk_action_group_new("MenuActions"); @@ -1895,6 +1896,7 @@ gtk_ui_manager_set_add_tearoffs(lw->ui_manager, TRUE); gtk_ui_manager_insert_action_group(lw->ui_manager, lw->action_group, 0); + DEBUG_1("%s layout_actions_setup: add menu", get_exec_time()); error = NULL; if (!gtk_ui_manager_add_ui_from_string(lw->ui_manager, menu_ui_description, -1, &error)) { @@ -1903,24 +1905,34 @@ exit(EXIT_FAILURE); } + DEBUG_1("%s layout_actions_setup: add toolbar", get_exec_time()); for (i = 0; i < TOOLBAR_COUNT; i++) { layout_toolbar_clear(lw, i); layout_toolbar_add_default(lw, i); } + + DEBUG_1("%s layout_actions_setup: marks", get_exec_time()); layout_actions_setup_marks(lw); + + DEBUG_1("%s layout_actions_setup: editors", get_exec_time()); layout_actions_setup_editors(lw); + DEBUG_1("%s layout_actions_setup: status_update_write", get_exec_time()); layout_util_status_update_write(lw); + DEBUG_1("%s layout_actions_setup: actions_add_window", get_exec_time()); layout_actions_add_window(lw, lw->window); + DEBUG_1("%s layout_actions_setup: end", get_exec_time()); } void layout_editors_reload_all(void) { GList *work; + DEBUG_1("%s layout_editors_reload_all: start", get_exec_time()); + work = layout_window_list; while (work) { @@ -1932,8 +1944,10 @@ g_object_unref(lw->action_group_editors); } + DEBUG_1("%s layout_editors_reload_all: editor_load_descriptions", get_exec_time()); editor_load_descriptions(); + DEBUG_1("%s layout_editors_reload_all: setup_editors", get_exec_time()); work = layout_window_list; while (work) { @@ -1941,6 +1955,7 @@ work = work->next; layout_actions_setup_editors(lw); } + DEBUG_1("%s layout_editors_reload_all: end", get_exec_time()); } void layout_actions_add_window(LayoutWindow *lw, GtkWidget *window)
--- a/src/main.c Sat Sep 05 13:48:21 2009 +0000 +++ b/src/main.c Sun Sep 06 09:08:37 2009 +0000 @@ -764,7 +764,9 @@ gtkrc_load(); - + + parse_command_line_for_debug_option(argc, argv); + DEBUG_1("%s main: gtk_init", get_exec_time()); #ifdef HAVE_LIBCHAMPLAIN #ifdef HAVE_LIBCHAMPLAIN_GTK gtk_clutter_init(&argc, &argv); @@ -785,11 +787,13 @@ log_printf("!!! %s may quit unexpectedly with a relocation error.\n", GQ_APPNAME); } + DEBUG_1("%s main: pixbuf_inline_register_stock_icons", get_exec_time()); pixbuf_inline_register_stock_icons(); - parse_command_line_for_debug_option(argc, argv); + DEBUG_1("%s main: parse_command_line", get_exec_time()); parse_command_line(argc, argv); + DEBUG_1("%s main: mkdir_if_not_exists", get_exec_time()); /* these functions don't depend on config file */ mkdir_if_not_exists(get_rc_dir()); mkdir_if_not_exists(get_collections_dir()); @@ -806,6 +810,7 @@ options = init_options(NULL); setup_default_options(options); + DEBUG_1("%s main: load_options", get_exec_time()); if (!load_options(options)) { /* load_options calls these functions after it parses global options, we have to call it here if it fails */ @@ -899,6 +904,7 @@ remote_connection = remote_server_init(buf, cd); g_free(buf); + DEBUG_1("%s main: gtk_main", get_exec_time()); gtk_main(); #ifdef HAVE_GTHREAD gdk_threads_leave();
--- a/src/rcfile.c Sat Sep 05 13:48:21 2009 +0000 +++ b/src/rcfile.c Sun Sep 06 09:08:37 2009 +0000 @@ -1164,7 +1164,7 @@ { GQParserData *parser_data = user_data; GQParserFuncData *func = parser_data->parse_func_stack->data; - DEBUG_1("start %s", element_name); + DEBUG_2("start %s", element_name); if (func->start_func) func->start_func(parser_data, context, element_name, attribute_names, attribute_values, func->data, error); @@ -1177,7 +1177,7 @@ { GQParserData *parser_data = user_data; GQParserFuncData *func = parser_data->parse_func_stack->data; - DEBUG_1("end %s", element_name); + DEBUG_2("end %s", element_name); if (func->end_func) func->end_func(parser_data, context, element_name, func->data, error);