From: David Barr Date: Mon, 21 Mar 2011 23:50:00 GMT Subject: [PATCH 11/11] vcs-svn: use strchr to find RFC822 delimiter Message-ID: <1300751400-7427-12-git-send-email-david.barr@cordelta.com> In-Reply-To: <1300751400-7427-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 Reviewed-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 897349e..88abf60 100644 --- a/vcs-svn/svndump.c +++ b/vcs-svn/svndump.c @@ -301,10 +301,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 */ -- 1.7.3.2.846.gf4b062