DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23303>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23303

Perfomance problem with matching ^(_?[A-Z0-9]+)*$ pattern





------- Additional Comments From [EMAIL PROTECTED]  2003-09-22 15:15 -------
The error email says it takes over a minute to match the pattern against
  "_NOERROR_AND_LAST_TXN_NOT_OK_AND_LAST_TXN_WAS_"
(and fail) but less than a millisecond to match the pattern against 
  "_NOERROR_AND_LAST_TXN_NOT_OK_AND_LAST_TXN_WAS"
(and succeed).  These are the same strings except for the final "_".

The "?" in the pattern gives a large degree of indeterminacy in how the match 
may be made if the greediest match fails.  The equivalent pattern
  "^[A-Z0-9]*(_[A-Z0-9]+)*$"
has much less indeterminacy and succeeds or fails very quickly with the above 
test strings.  I am tempted to say that the problem lies more with the pattern 
than the matcher.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to