From: David Barr Date: Sat, 19 Mar 2011 07:03:51 GMT Subject: [PATCH 9/9] vcs-svn: use strchr to find RFC822 delimiter Message-ID: <1300518231-20008-10-git-send-email-david.barr@cordelta.com> In-Reply-To: <1300518231-20008-1-git-send-email-david.barr@cordelta.com> 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 Signed-off-by: David Barr --- vcs-svn/svndump.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/vcs-svn/svndump.c b/vcs-svn/svndump.c index fd67db8..7bc2d3d 100644 --- a/vcs-svn/svndump.c +++ b/vcs-svn/svndump.c @@ -296,10 +296,12 @@ void svndump_read(const char *url) reset_dump_ctx(url); while ((t = buffer_read_line(&input))) { - val = strstr(t, ": "); + val = strchr(t, ':'); if (!val) continue; *val++ = '\0'; + if (*val != ' ') + continue; *val++ = '\0'; /* strlen(key) */ -- 1.7.3.2.846.gf4b062