Hi,

additional comment about the performance.
I have debuged the method parseURI with the following Argument:
file:/C:/Data/Eclipse/workspace-lib/WorldAccount-webapp/tomcat/webapps/wa/
I have append the Stackframe the regexp library need to resolve this
regexp. You can see that are a lot of recursive funktion calls and there is
a lot of code executed in each loop. I am a litle bit concerned about the
performance, because resolving is really often called in Cocoon.
Hmmmm,  "org.apache.regexp" library  is also used inside the Matcher, so I
asked me if there are faster regexp libraries available. Whats about the
ORO stuff? Are there some performance measurements available?

It seams that we need to write our own handwritten parser for the URI
stuff. What do you think?

Volker



Thread [Thread-8] (Suspended (breakpoint at line 1372 in
org.apache.regexp.RE))
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1372
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 962
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 985
      org.apache.regexp.RE.matchNodes(int, int, int) line: 985
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchNodes(int, int, int) line: 962
      org.apache.regexp.RE.matchNodes(int, int, int) line: 962
      org.apache.regexp.RE.matchNodes(int, int, int) line: 1428
      org.apache.regexp.RE.matchAt(int) line: 882
      org.apache.regexp.RE.match(org.apache.regexp.CharacterIterator, int)
line: 797
      org.apache.regexp.RE.match(java.lang.String, int) line: 768
      org.apache.regexp.RE.match(java.lang.String) line: 757
      org.apache.excalibur.source.SourceUtil.parseUrl(java.lang.String)
line: 740
      org.apache.excalibur.source.SourceUtil.absolutize(java.lang.String,
java.lang.String, boolean) line: 578
      org.apache.excalibur.source.SourceUtil.absolutize(java.lang.String,
java.lang.String) line: 541

org.apache.excalibur.source.impl.SourceResolverImpl.absolutize(org.apache.excalibur.source.SourceFactory,

java.lang.String, java.lang.String) line: 289

org.apache.excalibur.source.impl.SourceResolverImpl.resolveURI(java.lang.String,

java.lang.String, java.util.Map) line: 263

org.apache.cocoon.components.CocoonComponentManager.resolveURI(java.lang.String,

java.lang.String, java.util.Map) line: 450

org.apache.cocoon.environment.http.HttpEnvironment(org.apache.cocoon.environment.AbstractEnvironment).resolveURI(java.lang.String,

java.lang.String, java.util.Map) line: 513

org.apache.cocoon.environment.http.HttpEnvironment(org.apache.cocoon.environment.AbstractEnvironment).resolveURI(java.lang.String)

line: 500
<snip />


On Tue, 2003-06-10 at 11:01, Carsten Ziegeler wrote:
> Bruno Dumon wrote:
> > On Tue, 2003-06-10 at 10:02, Carsten Ziegeler wrote:
> > > Sylvain Wallez wrote:
> > > >
> > > > What about using the two ;-)
> > > > 1/ test if the URI is absolute. For this, you can use Excalibur's
> > > > SourceUtil.getScheme() which performs a strict control on
> > scheme syntax
> > > > without using a regexp.
> > > > 2/ if not, use the regexp only on the part before the '?'
> > (BTW, if '?'
> > > > is part of the URI, it should be encoded as %3F
> > > >
> > > That's what I tried to propose :)
> > >
> >
> > (Just now awakening)
> >
> > Is this the cause of the infinite loop, or is that still a seperate
> > problem?
> >
> My first guess that it is an infinite loop seems to be incorrect. It's
> rather
> that evaluation the regexp is implemented recursivly and that the longer
> the uri to test is, the more recursive calls you get. So in fact it
> is not an infinite loop but looks like one.
> So there is the hope that if 2/ is implemented, the recursion should be
> not that deep and fix the problem for now. 1/ is just a performance
> update.
>

Yep, after trying it out I saw it too.

Anybody working on this already? (or can I do it?)

--
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
[EMAIL PROTECTED]                          [EMAIL PROTECTED]






Reply via email to