César Martínez Izquierdo ha scritto:

> That sounds more interesting for me. I'm going to try this, but I'd
> like to know the consequences of it.
> By doing so, does it mean that features are not written to disk until
> the transaction is complete?
> This is important for me, as I'll create sometimes shapefiles > 1GB,
> so I shouldn't do this on memory.
> If that is really the effect, I guess I could create a transaction
> every 1000 features or so.

They are not kept in memory, we create a separate shapefile for the
transaction, and copy it back when the transaction is committed.
That is why your code is so slow, you don't set an explicit
transaction so an auto-commit one is created every time you do
addFeatures, meaning the shapefile is fully copied twice for
each of those calls

Cheers
Andrea


-- 
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to