Re: Scanner performance (was Re: 7.3 schedule)

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Scanner performance (was Re: 7.3 schedule)
Дата
Msg-id 200204161755.g3GHtfO19314@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: Scanner performance (was Re: 7.3 schedule)  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
Peter Eisentraut wrote:
> The string literals didn't contain any backslashes, so scanstr is
> operating in the best-case scenario here.  But for arbitary binary data we
> need some escape mechanism, so I don't see much room for improvement
> there.
> 
> It seems the real bottleneck is the excessive abstraction in the
> communications layer.  I haven't looked closely at all, but it would seem
> better if pq_getstring would not use pq_getbyte and instead read the
> buffer directly.

I am inclined to agree with your analysis.  We added abstraction to
libpq because the old code was quite poorly structured.  Now that it is
well structured, removing some of the abstraction seems valuable.

Any chance pq_getbyte could be made into a macro?  I would be glad to
send you a macro version for testing.  I would have to push the while
loop into pg_recvbuf() and change the while in pg_getbyte to an if, or
as a macro, ? :.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Scanner performance (was Re: 7.3 schedule)
Следующее
От: Jan Wieck
Дата:
Сообщение: Re: [GENERAL] Testers needed ...