[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Parsing Performance
> > I did the same in Java, and it is well over 1000 times slower. I > > agree with John that performance isn't everything, but 1000 times > > slower using the same technology is, IMO, completely unreasonable. > > The biggest mistake people make designing XML processing systems is > not distinguishing between what happens in the loop and what happens > outside the loop. > > Optimizations inside the parsing/processing loop can give enormous > payoffs -- for example, if you have a method that's invoked for every > element, every text chunk, or even every character, it's an excellent > candidate for optimization. On the other hand, optimizing a method > that's invoked only once per document (unless your system handles > thousands of small documents per minute) or once per session is > generally a waste. > > For example, let's say that a method currently runs in 10 > microseconds, and through brilliant refactoring, you make it 1000 > times faster. If that method is invoked once for every character in a > 1GB document, then you've just shaved 10 seconds off execution time -- > if you managed that with only a day's work, you deserve a productivity > aware. If, on the other hand, that method is invoked once during the > session, you've shaved about 0.00001 seconds off execution time -- if > you spent a whole day doing that, you deserve something more along the > lines of a bozo award. > > Using an exception to terminate parsing falls into the latter category > unless, as I mentioned, you have an application that processes > thousands of XML documents every minute. Absolutely agree. Just that my application happens to do that :) The biggest problem with large open standards is that they must serve a wide community of users and through that an even wider range of customers. I guess the issue here is that one should have the option of doing things either way. Wouldn't that serve the most people?
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|