From f1602054e3a45e195edf814681e8f5ba88851623 Mon Sep 17 00:00:00 2001 From: David Barr Date: Tue, 14 Dec 2010 11:06:43 +1100 Subject: [PATCH] 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 Signed-off-by: Jonathan Nieder --- vcs-svn/svndump.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/vcs-svn/svndump.c b/vcs-svn/svndump.c index 77680a31e..0919a576d 100644 --- a/vcs-svn/svndump.c +++ b/vcs-svn/svndump.c @@ -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) { -- 2.26.2