2012-10-25 [colin] 3.8.1cvs104
authorColin Leroy <colin@colino.net>
Thu, 25 Oct 2012 07:42:08 +0000 (07:42 +0000)
committerColin Leroy <colin@colino.net>
Thu, 25 Oct 2012 07:42:08 +0000 (07:42 +0000)
* src/textview.c
* src/textview.h
Avoid strlen() on big buffers, use precomputed length instead
it reduces cost of textview_write_line() from 32% to 3% for
big messages. Patch by Igor Mammedov
* AUTHORS
* src/gtk/authors.h
Add Igor

AUTHORS
ChangeLog
PATCHSETS
configure.ac
src/gtk/authors.h
src/textview.c
src/textview.h

diff --git a/AUTHORS b/AUTHORS
index edffd3f..fb968b3 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -291,3 +291,4 @@ contributors (in addition to the above; based on Changelog)
        Andreas Rönnquist
        Sean Buckheister
        Natanael Copa
+       Igor Mammedov
index f9f504a..d73970e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2012-10-25 [colin]     3.8.1cvs104
+
+       * src/textview.c
+       * src/textview.h
+               Avoid strlen() on big buffers, use precomputed length instead
+               it reduces cost of textview_write_line() from 32% to 3% for
+               big messages. Patch by Igor Mammedov
+       * AUTHORS
+       * src/gtk/authors.h
+               Add Igor
+
 2012-10-24 [mones]     3.8.1cvs103
 
        * src/advsearch.c
index e06b9f8..44f918a 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.1.2.7 -r 1.1.2.8 claws-mail.desktop;  ) > 3.8.1cvs101.patchset
 ( cvs diff -u -r 1.100.2.84 -r 1.100.2.85 AUTHORS;  cvs diff -u -r 1.23.2.39 -r 1.23.2.40 src/crash.c;  cvs diff -u -r 1.1.2.80 -r 1.1.2.81 src/gtk/authors.h;  ) > 3.8.1cvs102.patchset
 ( cvs diff -u -r 1.1.2.6 -r 1.1.2.7 src/advsearch.c;  ) > 3.8.1cvs103.patchset
+( cvs diff -u -r 1.100.2.85 -r 1.100.2.86 AUTHORS;  cvs diff -u -r 1.96.2.249 -r 1.96.2.250 src/textview.c;  cvs diff -u -r 1.12.2.35 -r 1.12.2.36 src/textview.h;  cvs diff -u -r 1.1.2.81 -r 1.1.2.82 src/gtk/authors.h;  ) > 3.8.1cvs104.patchset
index 7381ab4..1be67d3 100644 (file)
@@ -12,7 +12,7 @@ MINOR_VERSION=8
 MICRO_VERSION=1
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=103
+EXTRA_VERSION=104
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 5594f98..46753ff 100644 (file)
@@ -174,6 +174,7 @@ static char *CONTRIBS_LIST[] = {
 "Alessandro Maestri",
 "Maki",
 "Jindrich Makovicka",
+"Igor Mammedov",
 "Tim Mann",
 "Ivan Francolin Martinez",
 "HIRAMATSU Masami",
index d91b3ff..8c4b6e7 100644 (file)
@@ -1637,6 +1637,7 @@ do_quote:
                        uri = g_new0(ClickableText, 1);
                        uri->uri = g_strdup("");
                        uri->data = g_strdup(buf);
+                       uri->data_len = strlen(uri->data);
                        uri->start = gtk_text_iter_get_offset(&iter);
                        uri->is_quote = TRUE;
                        uri->quote_level = real_quotelevel;
@@ -1669,11 +1670,12 @@ do_quote:
                                        textview->prev_quote_level = -1;
                                        goto do_quote;
                                }
-                               e_len = lasturi->data ? strlen(lasturi->data):0;
+                               e_len = lasturi->data ? lasturi->data_len:0;
                                n_len = strlen(buf);
                                lasturi->data = g_realloc((gchar *)lasturi->data, e_len + n_len + 1);
                                strcpy((gchar *)lasturi->data + e_len, buf);
                                *((gchar *)lasturi->data + e_len + n_len) = '\0';
+                               lasturi->data_len += n_len;
                        }
                }
        } else {
index a128726..ed36b0b 100644 (file)
@@ -35,6 +35,7 @@ struct _ClickableText
        gchar *filename;
 
        gpointer data;
+       gint data_len;
 
        guint start;
        guint end;