performance improvements: replace memcmp
authorWilfried Goesgens <dothebart@citadel.org>
Mon, 22 Nov 2010 23:30:57 +0000 (00:30 +0100)
committerWilfried Goesgens <dothebart@citadel.org>
Mon, 22 Nov 2010 23:30:57 +0000 (00:30 +0100)
commitad2c6bbcda0735abefb377d725ff808572e726a2
treef0598ecd1959318b13667d08991514b8e59b1624
parentdb8a5b2aa96d071bc7813522d6f4e0cfbc9b969b
performance improvements: replace memcmp

 - looping forward while moving a pointer and doing memcmp isn't fast. replace it by strstr
 - \r\n can be done in a pointer dereferencing comparison.

Note: maybe we need to fallback to the memcmp way if there is binary content?
In that case we should do a little smarter and try to use contentlength-headers etc.
libcitadel/lib/libcitadel.h
libcitadel/lib/mime_parser.c