[geany/geany] e3e46e: Use gtk_tree_store_insert_with_values() to speed-up tree creation

Jiří Techet git-noreply at xxxxx
Sun May 3 17:36:26 UTC 2015


Branch:      refs/heads/master
Author:      Jiří Techet <techet at gmail.com>
Committer:   Jiří Techet <techet at gmail.com>
Date:        Sun, 03 May 2015 17:36:26 UTC
Commit:      e3e46ed63b722a83510acfa2615e34d1f0e23f32
             https://github.com/geany/geany/commit/e3e46ed63b722a83510acfa2615e34d1f0e23f32

Log Message:
-----------
Use gtk_tree_store_insert_with_values() to speed-up tree creation

About 30% faster tree creation.


Modified Paths:
--------------
    src/symbols.c

Modified: src/symbols.c
3 lines changed, 1 insertions(+), 2 deletions(-)
===================================================================
@@ -1521,10 +1521,9 @@ static void update_tree_tags(GeanyDocument *doc, GList **tags)
 			expand = ! gtk_tree_model_iter_has_child(model, parent);
 
 			/* insert the new element */
-			gtk_tree_store_append(store, &iter, parent);
 			name = get_symbol_name(doc, tag, parent_name != NULL);
 			tooltip = get_symbol_tooltip(doc, tag);
-			gtk_tree_store_set(store, &iter,
+			gtk_tree_store_insert_with_values(store, &iter, parent, -1,
 					SYMBOLS_COLUMN_NAME, name,
 					SYMBOLS_COLUMN_TOOLTIP, tooltip,
 					SYMBOLS_COLUMN_ICON, icon,



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Commits mailing list