Re: PQunescapeBytea code

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Adam Kavan <akavan(at)cox(dot)net>
Cc: "Jeroen T(dot) Vermeulen" <jtv(at)xs4all(dot)nl>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: PQunescapeBytea code
Date: 2003-10-31 01:46:32
Message-ID: 200310310146.h9V1kWr28839@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Adam Kavan wrote:
> Actually I was looking at that code today and it does not ignore something
> if it is escaped by a backslash on not on the list. It eats the backslash
> and then continues the loop so next time that character will be parsed
> normally. However PQunescapeBytea is _very_ slow. I am storing fairly
> large (several hundered K) byte strings into Bytea's and it can take 30
> seconds or more to convert them back into binary data. I wrote a new
> version of PQunescapeBytea that uses pointers instead of arrays to store
> the string in, this increases the speed about 30 fold on my strings and
> still has the same behavior. I wasn't sure if this would be something I
> should submit as a patch or not, is anyone interested in this?
>
> If they are I'll try to figure out how to submit a patch.

Are you testing againts 7.3.X or 7.4? 7.4 has a faster version. If you
are testing against 7.4, do a diff -c against the old and new files and
send it to the patches list.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-10-31 02:40:33 Experimental patch for inter-page delay in VACUUM
Previous Message Stephan Szabo 2003-10-31 01:45:27 Re: 7.4RC1 planned for Monday