[postgis-devel] Memory Leak (Two Senses)

Paul Ramsey pramsey at cleverelephant.ca
Wed Jan 7 15:21:27 PST 2009


On Wed, Jan 7, 2009 at 2:43 PM, Mark Cave-Ayland
<mark.cave-ayland at siriusit.co.uk> wrote:
> Yeah I can see the advantages in this, but of course there are lots of
> implications. Users would have to dump/restore their databases for one, and
> there would also be an increase in the size of data on disk (imagine the
> padding required for a 64-bit system...).

We want 64-bit (double) alignment, so I don't think there's any
difference, no?  And as far as I can see the cost is 3 bytes (which we
can use anyways, for more space for typing)

> I suspect it would be fairly fast; but I'd like to see some concrete numbers
> from a suitable test to ensure that the alignment/disk size tradeoff does
> actually have a measurable improvement over just a plain aligned memcpy().

Oh fooey :)  I can see doing what you want as an interim step, then
sliding the new approach beneath. Any change to something major like
this will require careful code review, which will make subsequent
changes easier, I hope.

My concern about your approach is that, while it will (should) make
the "whole geometry" ops like area calculations and predicate tests
faster, the penalty on partial-geometry ops (PointN, RingN) is so
large it could cause noticeable degradation for some users, a
"downgrade" as it were.

P.



More information about the postgis-devel mailing list