What a great idea; wonder if we could make a "FeatureCollection" or
FeatureIterator wrapper that maintained an internal buffer of features that
it could fill with one thread; while providing access from another?
Internally WFS has some similar code; but doing it as a wrapper would be
great :-)
> Your example has a big loop in it. It looks like we can't run each
> iteration independently and we can't speed up the components of the loop.
> But we can turn the loop iteration into a pipeline and run each part of the
> loop in a separate thread.
>
> In your example you don't start parsing the next SimpleFeature until after
> you've finished writing the previous SimpleFeature to disk. Split your
> read/write loop into a producer-consumer pattern. In one thread parses the
> input file into SimpleFeatures and the other thread writes those out as
> JSON. Stick a BlockingQueue in between the two threads so that you won't
> fill up memory with SimpleFeatures.
>
> That turned 14 seconds into 10 seconds.
>
> -Ryan
>
>
>
>
>
> On 4/28/2011 6:42 AM, Justin Deoliveira wrote:
>
> Hi Ashley,
>
> Unfortunately not really as streaming GML parsing options are limited. So
> I guess the answer would be to develop your own feature parser. Or try to
> profile the existing one to figure out how/if performance can be improved.
>
> -Jusitn
>
> On Wed, Apr 27, 2011 at 10:25 AM, mortac8 <[email protected]>wrote:
>
>> Any tips on how to improve its performance? By using a different XML
>> parser
>> or would you improve the performance in some other way? Maybe I could
>> help.
>>
>> Thanks again!
>> Ashley
>>
>> --
>> View this message in context:
>> http://osgeo-org.1803224.n2.nabble.com/Large-KML-file-to-GeoJSON-performance-question-tp6306341p6310159.html
>> Sent from the geotools-gt2-users mailing list archive at Nabble.com.
>>
>>
>> ------------------------------------------------------------------------------
>> WhatsUp Gold - Download Free Network Management Software
>> The most intuitive, comprehensive, and cost-effective network
>> management toolset available today. Delivers lowest initial
>> acquisition cost and overall TCO of any competing solution.
>> http://p.sf.net/sfu/whatsupgold-sd
>> _______________________________________________
>> Geotools-gt2-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>>
>
>
>
> --
> Justin Deoliveira
> OpenGeo - http://opengeo.org
> Enterprise support for open source geospatial.
>
>
> ------------------------------------------------------------------------------
> WhatsUp Gold - Download Free Network Management Software
> The most intuitive, comprehensive, and cost-effective network
> management toolset available today. Delivers lowest initial
> acquisition cost and overall TCO of any competing
> solution.http://p.sf.net/sfu/whatsupgold-sd
>
>
> _______________________________________________
> Geotools-gt2-users mailing
> [email protected]https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>
>
>
>
> ------------------------------------------------------------------------------
> WhatsUp Gold - Download Free Network Management Software
> The most intuitive, comprehensive, and cost-effective network
> management toolset available today. Delivers lowest initial
> acquisition cost and overall TCO of any competing solution.
> http://p.sf.net/sfu/whatsupgold-sd
> _______________________________________________
> Geotools-gt2-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>
>
------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network
management toolset available today. Delivers lowest initial
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users