libpq: PQgetCopyData() and allocation overhead

Поиск
Список
Период
Сортировка
От Jeroen Vermeulen
Тема libpq: PQgetCopyData() and allocation overhead
Дата
Msg-id CA+zULE5AYd+78w7Uu7jN=5N3w-9vsKuK2WrpjkKwS65hyhWfbw@mail.gmail.com
обсуждение исходный текст
Ответы Re: libpq: PQgetCopyData() and allocation overhead  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Список pgsql-hackers
Would there be interest in a variant of PQgetCopyData() that re-uses the same buffer for a new row, rather than allocating a new buffer on each iteration?

I tried it on a toy benchmark, and it reduced client-side CPU time by about 12%.  (Less of a difference in wall-clock time of course; the client was only using the CPU for a bit over half the time.)


Jeroen

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Importing pg_bsd_indent into our source tree
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: Minor meson gripe