Revision: 1835
          http://geeqie.svn.sourceforge.net/geeqie/?rev=1835&view=rev
Author:   nadvornik
Date:     2009-09-06 09:08:37 +0000 (Sun, 06 Sep 2009)

Log Message:
-----------
added messages for debugging startup time

Modified Paths:
--------------
    trunk/src/layout.c
    trunk/src/layout_util.c
    trunk/src/main.c
    trunk/src/rcfile.c

Modified: trunk/src/layout.c
===================================================================
--- trunk/src/layout.c  2009-09-05 13:48:21 UTC (rev 1834)
+++ trunk/src/layout.c  2009-09-06 09:08:37 UTC (rev 1835)
@@ -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;
 }
 

Modified: trunk/src/layout_util.c
===================================================================
--- trunk/src/layout_util.c     2009-09-05 13:48:21 UTC (rev 1834)
+++ trunk/src/layout_util.c     2009-09-06 09:08:37 UTC (rev 1835)
@@ -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)

Modified: trunk/src/main.c
===================================================================
--- trunk/src/main.c    2009-09-05 13:48:21 UTC (rev 1834)
+++ trunk/src/main.c    2009-09-06 09:08:37 UTC (rev 1835)
@@ -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();

Modified: trunk/src/rcfile.c
===================================================================
--- trunk/src/rcfile.c  2009-09-05 13:48:21 UTC (rev 1834)
+++ trunk/src/rcfile.c  2009-09-06 09:08:37 UTC (rev 1835)
@@ -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);


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Geeqie-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geeqie-svn

Reply via email to