performance - Speedy search for JAXB object -
in own benchmark , in other web links, jaxb faster parsing xml files compared dom library. however, when tried search jaxb object root object, speed disappointing compared dom.
for search jaxb, used apache jxpath library, i.e., jxpathcontext class , getvalue() method. comparatively, search dom, used document class , getelementsbytagname() method. benchmark shows former slower later.
so here dilema, if want parse xml files fast, want use jaxb, if want search node object quickly, have use dom. wondering whether there optimal way both, example, faster method jaxb object search or jaxb tree traveling jxpath.
thanks in advance!
am missing obvious here?
jaxb marshals java objects. java objects can carry methods. such search method. lot faster having rely on heap of introspection sniff out annotations generic method, since, can skip irrelevant parts of xml default. better: can optimise data structures (the java objects) specific search queries.
Comments
Post a Comment