[postgis-devel] code reorganization in pgsql2shp.c
Paul Ramsey
pramsey at refractions.net
Mon Nov 17 08:59:14 PST 2003
It fetching one record at a time the best policy? Maybe a few hundred or
thousand at a time would be faster?
strk wrote:
> I've made a big re-organization of code in pgsql2shp.c
> I hope this won't confuse anyone.
>
> There is now a main loop fetching records from a cursor.
> Each iteration will call a record handler function.
> The very first iteration calls a shapefile initializer function.
>
> The dumper runs slightly faster due to reduced string comparisions.
> Records are fetched one by one, thus memory usage is greatly reduced.
> Many bugs have been fixed and errors have been handled.
> A lot of code has been cleaned up. I belive it is now more readable.
>
> I did change creator functions signature to be the same for all type
> of geometries thus allowing for an indirect call in the record handler
> function. I did not look *inside* them. Their signature can probably
> be reduced since most *global* variables have been moved to global scope.
> They could also be faster using WKB, but that's probably not urgent.
>
> Please give it a try.
>
> --strk;
>
>
>
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel
--
__
/
| Paul Ramsey
| Refractions Research
| Email: pramsey at refractions.net
| Phone: (250) 885-0632
\_
More information about the postgis-devel
mailing list