Обсуждение: pgsql: Use appendStringInfoString() where appropriate in elog.c.

Поиск
Список
Период
Сортировка

pgsql: Use appendStringInfoString() where appropriate in elog.c.

От
Tom Lane
Дата:
Use appendStringInfoString() where appropriate in elog.c.

The nominally equivalent call appendStringInfo(buf, "%s", str) can be
significantly slower when str is large.  In particular, the former usage in
EVALUATE_MESSAGE led to O(N^2) behavior when collecting a large number of
context lines, as I found out while testing recursive functions.  The other
changes are just neatnik-ism and seem unlikely to save anything meaningful,
but a cycle shaved is a cycle earned.

Branch
------
master

Details
-------
http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=09211659d9d8fd62f9de09703c90ed4f072c4a47

Modified Files
--------------
src/backend/utils/error/elog.c |   51 ++++++++++++++++++++++-----------------
1 files changed, 29 insertions(+), 22 deletions(-)