pgsql: Avoid unnecessary copying of source string when generating a

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Avoid unnecessary copying of source string when generating a
Date: 2009-12-15 20:37:17
Message-ID: 20091215203717.A32A3753FB7@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
Avoid unnecessary copying of source string when generating a cloned TParser.
For long source strings the copying results in O(N^2) behavior, and the
multiplier can be significant if wide-char conversion is involved.

Andres Freund, reviewed by Kevin Grittner.

Modified Files:
--------------
pgsql/src/backend/tsearch:
wparser_def.c (r1.25 -> r1.26)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/tsearch/wparser_def.c?r1=1.25&r2=1.26)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2009-12-15 22:59:55 pgsql: Python 3 support in PL/Python Behaves more or less unchanged
Previous Message Robert Haas 2009-12-15 20:36:25 Re: pgsql: Add an EXPLAIN (BUFFERS) option to show buffer-usage statistics.