Re: Changes to stringinfo.c - Mailing list pgsql-hackers

From David Rowley
Subject Re: Changes to stringinfo.c
Date
Msg-id CAApHDvp5yxwxs9-nRhOD=AWRFderufsW8d37O7F939YKUJ+nvA@mail.gmail.com
Whole thread Raw
In response to Re: Changes to stringinfo.c  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Sun, Oct 27, 2013 at 3:04 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
David Rowley <dgrowleyml@gmail.com> writes:
> I'm just looking at the changed code in commit
> 3147acd63e0135aff9a6c4b01d861251925d97d9 and I'm wondering if we should
> perhaps test the performance of this before assuming too much that it is an
> improvement. I'm a bit concerned that now if there is not enough space in
> the buffer that we only now allocate what is needed, whereas before we
> would double the buffer's size. I guess this will save memory in many
> cases, but I'm a bit worried that we'll see quite a big drop in performance
> when we next try to append to the string and have to reallocate space again.

Hm?  enlargeStringInfo() still enforces the doubling behavior, AFAICS.
I don't see value in doubling the needed-space estimate before that.


Oops, you're right. Sorry for the noise.

 
                        regards, tom lane

pgsql-hackers by date:

Previous
From: Noah Misch
Date:
Subject: Re: proposal: lob conversion functionality
Next
From: Gordon Mohr
Date:
Subject: Re: high-dimensional knn-GIST tests (was Re: Cube extension kNN support)