Differences From Artifact [e2b24f34eb]:
- File
src/OFXMLParser.m
— part of check-in
[8953d826b4]
at
2011-10-11 22:21:16
on branch trunk
— More OFXMLParser optimizations.
With the last few commits, OFXMLParser is now twice as fast as before. (user: js, size: 25478) [annotate] [blame] [check-ins using]
To Artifact [6cac706d3c]:
- File src/OFXMLParser.m — part of check-in [87cd99ff88] at 2011-10-24 18:28:28 on branch trunk — Don't retain delegates to prevent reference cycles. (user: js, size: 25406) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
32 33 34 35 36 37 38 | #import "OFFile.h" #import "OFAutoreleasePool.h" #import "OFInitializationFailedException.h" #import "OFMalformedXMLException.h" #import "OFUnboundNamespaceException.h" | < < | 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | #import "OFFile.h" #import "OFAutoreleasePool.h" #import "OFInitializationFailedException.h" #import "OFMalformedXMLException.h" #import "OFUnboundNamespaceException.h" typedef void (*state_function)(id, SEL, const char*, size_t*, size_t*); static SEL selectors[OF_XMLPARSER_NUM_STATES]; static state_function lookupTable[OF_XMLPARSER_NUM_STATES]; static OF_INLINE void cache_append(OFDataArray *cache, const char *string, of_string_encoding_t encoding, size_t length) |
︙ | ︙ | |||
209 210 211 212 213 214 215 | } return self; } - (void)dealloc { | < < | | | 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 | } return self; } - (void)dealloc { [cache release]; [name release]; [prefix release]; [namespaces release]; [attributes release]; [attributeName release]; [attributePrefix release]; [previous release]; [super dealloc]; } - (id <OFXMLParserDelegate>)delegate { return delegate; } - (void)setDelegate: (id <OFXMLParserDelegate>)delegate_ { delegate = delegate_; } - (void)parseBuffer: (const char*)buffer withLength: (size_t)length { size_t i, last = 0; |
︙ | ︙ |