Re: realloc suggestion

From: Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: realloc suggestion
Date: 2001-01-23 15:59:50
Message-ID: Pine.LNX.3.96.1010123165549.10618B-100000@ara.zf.jcu.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On Mon, 22 Jan 2001, Tom Lane wrote:

> Karel Zak <zakkr(at)zf(dot)jcu(dot)cz> writes:
> > I again a little look at aset code and I probably found small performance
> > reserve in small chunks (chunk <= ALLOC_CHUNK_LIMIT) reallocation.
>
> Hmm. I wouldn't have thought that realloc got called often enough to be
> worth optimizing, but it does seem to get called a few hundred times
> during the regress tests, so maybe it's worth a little more code to do
> this. (Looks like most of the realloc calls come from enlargeStringInfo
> while dealing with long query strings --- since in this case the string
> buffer is the only thing yet allocated in QueryContext, the special-case
> check wins.)
>
> I've committed this change. Thanks for the suggestion!

I love OpenSource and CVS source distribution model - only couple hours
between idea and official source change :-)

Karel

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2001-01-23 16:12:23 Re: question
Previous Message Karel Zak 2001-01-23 15:48:58 Re: PL/Python (was: Re: [GENERAL] Re: Trigger)