Michael Lutz wrote:
> Hi,
> 
> we keep experimenting with the StreamingParser and ran into another 
> problem when trying to parse a feature (Greenland) with a large 
> Multipolygon (consisting of 1300+ polygons).
> 
> When parsing the separate polygons using the following code, it takes 
> about 8 sec.
> 
>    String xpath = "//polygonMember";
>    StreamingParser parser = new StreamingParser(configuration,in,xpath);
>    Polygon p = null;
>    while(  (p = (Polygon) parser.parse()) != null ) {
>      // do something with Polygon
>    }
Yeah... Like I said I have not had a chance to make any optimizations to
the streaming parser. I will try to get a chance in the next few days to
 profile the code. I am pretty sure an easy optimzation will be not to
create the jxpath context for each element, that should speed things up
a lot.
> 
> When trying to parse the whole feature instead using
> 
>    String xpath = "//featureMember";
>    StreamingParser parser = new StreamingParser(configuration,in,xpath);
>    Feature p = null;
>    while(  (p = (Feature) parser.parse()) != null ) {
>      // do something with Feature
>    }
> 
> it takes ages (actually, I killed the process after 10 mins).
Hmmm, do you have any idea of how detailed the polygon is, like how many
coordinates are stored. I have had similar experiences with JTS and very
large polygons. A lot of memory can be burned, it may just be that you
are stuck in swapping hell... Have you tried increasing the memory that
java is running with?
> 
> I'm afraid I cannot send the data (due to copyright restrictions) we're 
> trying to parse.
> 
> But maybe you have some clues on what the problem might be, anyway.
> 
> Cheers,
> Michael
> 
> 
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Geotools-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-devel
> 
> !DSPAM:1004,45e2ca70316531194215290!
> 


-- 
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to