[gtksourceview] CompletionWords: ~3x faster when working on strings



commit 17caa5d1eee4e2a0f80979b71f7ef61a8ad9dee3
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Mon Jun 24 12:31:52 2013 +0200

    CompletionWords: ~3x faster when working on strings
    
    Tested with short lines: 1.32 seconds with strings, 3.17 seconds with
    text iters (2.4x faster).
    
    Tested with long lines: 16.62 seconds with strings, 58.82 seconds with
    text iters (3.5x faster).

 .../words/gtksourcecompletionwordsutils.c          |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtksourceview/completion-providers/words/gtksourcecompletionwordsutils.c 
b/gtksourceview/completion-providers/words/gtksourcecompletionwordsutils.c
index d27034b..ad39e74 100644
--- a/gtksourceview/completion-providers/words/gtksourcecompletionwordsutils.c
+++ b/gtksourceview/completion-providers/words/gtksourcecompletionwordsutils.c
@@ -24,8 +24,8 @@
 #include <string.h>
 
 /* Here, we work on strings. It is more efficient than working with
- * GtkTextIters to traverse the text. Both techniques are equally difficult to
- * implement.
+ * GtkTextIters to traverse the text (~3x faster). Both techniques are equally
+ * difficult to implement.
  */
 
 static gboolean


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]