RE: [xsl] Backtracking and eternal loops caused by regular expressions matching: what to expect from implementations?

Subject: RE: [xsl] Backtracking and eternal loops caused by regular expressions matching: what to expect from implementations?
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Tue, 23 Jan 2007 23:32:20 -0000
> I am under the impression that such behavior is not 
> desirable, but I am unsure if there is anything in the specs 
> that says something about how implementations should/must 
> deal with this. As a comparison, I tried the example with 
> Perl, which gave no noticeable performance troubles.

(a) Poor performance is never desirable, though sometimes it's unavoidable
given the specification of the language you are using.

(b) The specs have nothing to say about performance.

(c) Saxon relies entirely on the regex engines in the underlying platform
(Java or .NET). I dare say there are cases where one regex engine will find
an optimization that another one misses.

(d) I was under the impression that regular expression evaluation will
always terminate, though of course it's possible to construct cases where
that might require extreme patience to observe.

Michael Kay
http://www.saxonica.com/ 

Current Thread