[Rt-devel] [PATCH] Perfomance improvement of Tickets->_parser call.

Robert Spier rspier at pobox.com
Sun Nov 6 22:38:43 EST 2005


So, a year later, I find this in my inbox.

Sheepish apologies for sitting on this.

It looks good to me.  Can you write up a Benchmark for it so we can
make sure it actually makes things faster?

Also,

-    # Highest priority is last
-    $current = OP      if _match($re_op,$val);
-    $current = VALUE   if _match($re_value,$val);
-    $current = KEYWORD if _match($re_keyword,$val) && ($want & KEYWORD);
-    $current = AGGREG  if _match($re_aggreg,$val);
-    $current = PAREN   if _match($re_paren,$val);
+    foreach( OPEN_PAREN, CLOSE_PAREN, AGGREG, OP, KEYWORD, VALUE ) {

The priority order has changed.  In theory, that could change how
certain constructs are parsed, because they match another regexp.  In
practice, it may not matter.

-R


At Mon, 17 May 2004 03:03:46 +0400,
Ruslan U. Zakirov wrote:
> 
> 	Hello, Robert.
> I revert regexps changes and some other, but add other changes.
> 
> Not it has next changes:
> 1) get rid from _match.
> 2) split PAREN into OPEN_PAREN & CLOSE_PAREN so parser know more about
> errors, such as ')(', 'OR )'...
> 3) fix one 'fixme'
> 4) fix always negative error check.
> 
> 			Best regards. Ruslan.
> 
> [snip]


More information about the Rt-devel mailing list