Return-Path: Delivered-To: apmail-xml-cocoon-dev-archive@xml.apache.org Received: (qmail 48505 invoked by uid 500); 10 Jun 2003 07:15:24 -0000 Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-dev@xml.apache.org Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 48490 invoked from network); 10 Jun 2003 07:15:23 -0000 Received: from mail.s-und-n.de (212.8.217.2) by daedalus.apache.org with SMTP; 10 Jun 2003 07:15:23 -0000 Received: from mail.s-und-n.de (localhost [127.0.0.1]) by mail2.s-und-n.de (postfix) with ESMTP id 5BE9CB0B7B for ; Tue, 10 Jun 2003 09:15:35 +0200 (CEST) Received: from notes.sundn.de (ntsrv5.sundn.de [10.10.2.10]) by mail.s-und-n.de (postfix) with ESMTP id 4AD11B0AB0 for ; Tue, 10 Jun 2003 09:15:33 +0200 (CEST) Received: from hw0386 ([10.10.2.36]) by notes.sundn.de (Lotus Domino Release 5.0.8) with SMTP id 2003061009153199:9491 ; Tue, 10 Jun 2003 09:15:31 +0200 From: "Carsten Ziegeler" To: Subject: RE: [BUG]: Endless recursion in source resolving Date: Tue, 10 Jun 2003 09:17:06 +0200 Message-ID: MIME-Version: 1.0 X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Importance: Normal X-MIMETrack: Itemize by SMTP Server on PBSN1/Systeme und Netzwerke(Release 5.0.8 |June 18, 2001) at 10.06.2003 09:15:32, Serialize by Router on PBSN1/Systeme und Netzwerke(Release 5.0.8 |June 18, 2001) at 10.06.2003 09:15:33, Serialize complete at 10.06.2003 09:15:33 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="iso-8859-1" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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