pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Daniel Verite <daniel@manitou-mail.org>
Cc: Andreas Karlsson <andreas@proxel.se>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: Unicode normalization SQL functions
Date: Wed, 19 Feb 2020 21:23:12 +0100
Message-ID: <b0c0dbbd-9142-6bf8-4483-3a46360c55d3@2ndquadrant.com> (raw)
In-Reply-To: <2c5e8df9-43b8-41fa-88e6-286e8634f00a@manitou-mail.org>
References: <2c5e8df9-43b8-41fa-88e6-286e8634f00a@manitou-mail.org>

On 2020-02-17 20:08, Daniel Verite wrote:
> Concerning execution speed, there's an excessive CPU usage when
> normalizing into NFC or NFKC. Looking at pre-existing code, it looks
> like recompose_code() in unicode_norm.c looping over the
> UnicodeDecompMain array might be very costly.

Yes, this is a known issue and I think room for future optimization work.

> Another point is that the ICU-based implementation appears
> to be significantly faster in all cases, which makes me wonder
> why ICU builds should not just use ICU instead of the PG-core
> implementation.

That would require linking libpq to ICU (for SASLprep), and in general 
would either make ICU required or require maintaining multiple 
implementations.  I don't think we're there yet.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services





view thread (23+ messages)  latest in thread

Message-ID: <b0c0dbbd-9142-6bf8-4483-3a46360c55d3@2ndquadrant.com>
Permalink:  ../b0c0dbbd-9142-6bf8-4483-3a46360c55d3@2ndquadrant.com/
Also on:    postgresql.org/message-id/b0c0dbbd-9142-6bf8-4483-3a46360c55d3@2ndquadrant.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: peter.eisentraut@2ndquadrant.com, daniel@manitou-mail.org, andreas@proxel.se
  Subject: Re: Unicode normalization SQL functions
  In-Reply-To: <b0c0dbbd-9142-6bf8-4483-3a46360c55d3@2ndquadrant.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox