MapLoader algorithm improvement
-------------------------------
Key: CAY-740
URL: https://issues.apache.org/cayenne/browse/CAY-740
Project: Cayenne
Issue Type: Improvement
Components: Cayenne Core Library
Affects Versions: 3.0
Reporter: Andrus Adamchik
Assigned To: Andrus Adamchik
Priority: Minor
Fix For: 3.0
MapLoader XML tag decoding logic is linear (each new tag is compared in turn with all known tags, and an appropriate action is taken on match). As the number of distinct tags in the model increases, it becomes slower. This task is to improve parsing algorithm performance by precompiling all operations and storing them in a Map, keyed by tag name. My tests show that the new algorithm is relatively slower for projects with a single DataMap (due to initialiazation of all the inner classes), however it is faster for multi-map large projects where it matters most.
I guess a true contextual parser will be even faster, but the suggested solution is good enough too.
-- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
This archive was generated by hypermail 2.0.0 : Thu Jan 25 2007 - 08:35:19 EST