Lists: | pgsql-committers |
---|
From: | John Naylor <john(dot)naylor(at)postgresql(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Speed up lexing of long JSON strings |
Date: | 2022-09-02 02:48:56 |
Message-ID: | E1oTwjo-0011bl-FL@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-committers |
Speed up lexing of long JSON strings
Use optimized linear search when looking ahead for end quotes,
backslashes, and non-printable characters. This results in nearly 40%
faster JSON parsing on x86-64 when most values are long strings, and
all platforms should see some improvement.
Reviewed by Andres Freund and Nathan Bossart
Discussion: https://www.postgresql.org/message-id/CAFBsxsGhaR2KQ5eisaK%3D6Vm60t%3DaxhD8Ckj1qFoCH1pktZi%2B2w%40mail.gmail.com
Discussion: https://www.postgresql.org/message-id/CAFBsxsESLUyJ5spfOSyPrOvKUEYYNqsBosue9SV1j8ecgNXSKA%40mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/0a8de93a48ce1e7479fb75fe10a8859559ec0c09
Modified Files
--------------
src/common/jsonapi.c | 13 ++++++++++---
src/test/regress/expected/json.out | 13 +++++++++++++
src/test/regress/sql/json.sql | 5 +++++
3 files changed, 28 insertions(+), 3 deletions(-)