Re: tsearch parser inefficiency if text includes urls or emails - new version

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-hackers(at)postgresql(dot)org
Cc: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>, "Oleg Bartunov" <oleg(at)sai(dot)msu(dot)su>, teodor(at)sigaev(dot)ru
Subject: Re: tsearch parser inefficiency if text includes urls or emails - new version
Date: 2009-11-14 00:39:45
Message-ID: 200911140139.45534.andres@anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Saturday 14 November 2009 01:03:33 Kevin Grittner wrote:
> It is in context format, applies cleanly, and passes "make check".
Unfortunately the latter is not saying much - I had a bug there and it was not
found by the regression tests. Perhaps I should take a stab and add at least
some more...

> It is in context format, applies cleanly, and passes "make check".
> Next I read through the code, and have the same question that Andres
> posed 12 days ago. His patch massively reduces the cost of the parser
> recursively calling itself for some cases, and it seems like the least
> invasive way to modify the parser to solve this performance problem;
> but it does beg the question of why a state machine like this should
> recursively call itself when it hits certain states.
I was wondering about that as well. I am not completely sure but to me it
looks like its just done to reduce the amount of rules and states.

I have to say that that code is not exactly clear and well documented...

Andres

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bernd Helmle 2009-11-14 02:01:43 Re: ALTER ROLE/DATABASE RESET ALL versus security
Previous Message James Mansion 2009-11-14 00:14:28 Re: Listen / Notify rewrite