Issue with parsing of GML3 with large geometries.
-------------------------------------------------

                 Key: GEOT-3291
                 URL: http://jira.codehaus.org/browse/GEOT-3291
             Project: GeoTools
          Issue Type: Bug
          Components: core xml
    Affects Versions: 2.6.2
         Environment: OS X 10.6.4, JDK 1.6.0_20, Tomcat 6.0.29
            Reporter: Tom Kunicki
             Fix For: 2.6.2
         Attachments: geotools-issue.tgz


Attempting to parse a large GML3 document currently requires heap space roughly 
20 times the size of the XML.

After stepping through the profiler, it was noticed that with the handling of 
lists of literals (i.e. a GML posList) a new element is created for each item 
in each list in org.geotools.xml.impl.ParseExecutor.preParse(...).  Each of 
these new elements is then parsed for bindings and the associated 
BindingChainExecutor instance cached in the parsers BindingWalker instance.  
For a GML document with a large number of coordinates this heap usage is 
problematic and excludes the parsing of large GML documents...

Attached is a maven project showing the current behavior along with what I 
believe to be a low-risk patch (reuse the dynamic element created for a given 
list).  Further efficiencies could be gained but look to require some 
rearchitecture...

For the attached test case containing a 15 MiBi GML3 document parsing time was 
reduced 50% and heap utilization was reduced from roughly 385 MIBi to less than 
1 MiBi.

To run the test case, untar/gzip and run 'mvn -q install' in the root directory 
of the uncompressed archive.  install is required and the tests are bundled as 
maven modules with a dependency between modules (this was needed since the 
patched and unpatched code needed to run in with separate classpaths...)


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to