Browse Source

vcs-svn: use strchr to find RFC822 delimiter

This is a small optimisation (4% reduction in user time) but is the
largest artifact within the parsing portion of svndump.c

Signed-off-by: David Barr <david.barr@cordelta.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
maint
David Barr 14 years ago committed by Jonathan Nieder
parent
commit
f1602054e3
  1. 7
      vcs-svn/svndump.c

7
vcs-svn/svndump.c

@ -297,10 +297,13 @@ void svndump_read(const char *url) @@ -297,10 +297,13 @@ void svndump_read(const char *url)

reset_dump_ctx(pool_intern(url));
while ((t = buffer_read_line(&input))) {
val = strstr(t, ": ");
val = strchr(t, ':');
if (!val)
continue;
val += 2;
val++;
if (*val != ' ')
continue;
val++;

/* strlen(key) + 1 */
switch (val - t - 1) {

Loading…
Cancel
Save