cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler" <cziege...@s-und-n.de>
Subject RE: [BUG]: Endless recursion in source resolving
Date Tue, 10 Jun 2003 07:17:06 GMT
Carsten Ziegeler wrote:
> 
> After updating to the latest cvs I get an infinite loop in the
> new portal demo:
> http://localhost:8888/samples/portal/portal
> 
> I guess this is caused by the recent changes to the source
> resolving.
> 
> Any clues?
> 
It seems that the current implementation of the source resolver
is not very effective (thanks to Volker for the analysis :) ):
For each URI the absolutize() method is invoked, and this
uses the new regular expression to test the uri if it is
relative or not. 
The implementation of the regular expression uses a very deep
stack that depends on the size (length) of the uri. In the
portal we have very huge uris (many request parameters appended)
and therefore the stack gets very deep creating the exception.

Now I see two simple improvements: a) don't use the regexp
on request parameters, which means search for a '?' and invoke
the regexp only on the part before the '?'.
b) A quick test if the uri is already absolute. If the URI
is already absolute we don't need the regexp test.

In general the current solution seems to decrease the performance
as for each and every uri a regexp test is used.

Carsten

Mime
View raw message