[postgis-devel] Make war on LWGEOM_INSPECTED

Olivier Courtin olivier.courtin at oslandia.com
Fri Nov 19 09:12:33 PST 2010


On Nov 19, 2010, at 5:19 PM, Paul Ramsey wrote:


>> But the performance was poorer, something like 20-30% if i recall.
>> I didn't took time since to investigate why and if it could be  
>> significantly
>> improved
>
> Interesting, I figured the cost of memory reallocation in the
> stringbuffer would be offset by the savings of not traversing the
> geometry twice.

Yes my guess too,


> BTW, the memory cost should be lower in PgSQL than in
> bare liblwgeom because a palloc is a lot faster than a malloc.

Oh i never thought about that,
in my mind palloc was based on underneath malloc call

> The obvious way to save time is to preallocate more room in the
> stringbuffer, so the number of reallocations is lowered. Perhaps a
> simple metric that counts vertices first would provide enough of a
> guide to allocate "enough" space to avoid a reallocation in the
> buffer. Memory is cheap these days.

Sounds good to me

>> On the timing aspect, is it something you want to be done ASAP
>> or it could be postpone till very end of December ?
>
> I would be hoping for sooner than later. My current goal is to remove
> all functions that work with serializations directly, getting all that
> functionality hidden under the ptarray API. You have good regression
> suites, so I don't feel too scared about doing it myself if you're too
> busy.

Ok, so i let you take this, will be difficult to me to done it that  
quickly,
and yes cunit covers are good enough on theses ones.

On my own i will then focus on part 2 of #658
aka updating serialization for 2.0

--
Olivie



More information about the postgis-devel mailing list