From: Andrea A. <aa...@op...> - 2009-12-22 11:11:24
|
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. |