Thomas Jones-Low wrote:

Dennis Sosnoski wrote:

The Javolution pull parser is not an implementation of XMLPull - it's similar in functionality, but that doesn't count where compatibility is concerned. It's using CharSequence rather than String, which I think is a good idea - I've suggested it in the past to the XPP3 team, but they haven't been very interested in pursuing it. The only drawback to CharSequence is that it's strictly 1.4 and above.

My brain is slowly remembering this. I thought it would be a simple thing to fix, but ended up digging deeper and deeper into the JiBX code, and ultimately getting lost.

I'm not sure how much faster the Javolution parser really is, and if it would make that much of a difference. But if someone really needs that last bit of speed it may be an interesting idea.

It'd be interesting to try, but would require some pervasive changes to be used consistently. The nastiest part is that using CharSequence would break 1.3 compatibility. It's also possible that using the interface would actually make things slower with other parsers (since going through an interface was slower than direct calls to methods defined on an object, at least the last time I checked - 1.3 or 1.4).

The only case where you'd see any gain from using CharSequence rather than String is when the characters are being consumed by a conversion process (as with ints, floats, etc.) rather than stored as Strings. The most common primitive values are handled specially in the current unmarshalling code, with type-specific method calls. You could try changing UnmarshallingContext to use the Javolution parser and just convert the CharSequence to a String for external consumption, while using CharSequence versions of the conversion code for the primitive types with special handling. I doubt it'd make a big difference in performance, but I'd be interested in seeing the results.

 - Dennis


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
jibx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to