Return-Path: Delivered-To: apmail-httpd-apreq-dev-archive@www.apache.org Received: (qmail 74608 invoked from network); 31 Mar 2007 04:42:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 31 Mar 2007 04:42:42 -0000 Received: (qmail 64219 invoked by uid 500); 31 Mar 2007 04:42:50 -0000 Delivered-To: apmail-httpd-apreq-dev-archive@httpd.apache.org Received: (qmail 64086 invoked by uid 500); 31 Mar 2007 04:42:50 -0000 Mailing-List: contact apreq-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Id: Delivered-To: mailing list apreq-dev@httpd.apache.org Received: (qmail 64075 invoked by uid 99); 31 Mar 2007 04:42:50 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Mar 2007 21:42:49 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of gcaa-apreq-dev@m.gmane.org designates 80.91.229.2 as permitted sender) Received: from [80.91.229.2] (HELO ciao.gmane.org) (80.91.229.2) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Mar 2007 21:42:41 -0700 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1HXVPn-0005Oi-Lz for apreq-dev@httpd.apache.org; Sat, 31 Mar 2007 06:42:11 +0200 Received: from adsl-065-012-220-185.sip.bct.bellsouth.net ([65.12.220.185]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 31 Mar 2007 06:42:11 +0200 Received: from joe+gmane by adsl-065-012-220-185.sip.bct.bellsouth.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 31 Mar 2007 06:42:11 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: apreq-dev@httpd.apache.org To: apreq-dev@httpd.apache.org From: Joe Schaefer Subject: Re: Parsing error when parsing the second time Date: Sat, 31 Mar 2007 00:42:00 -0400 Lines: 56 Message-ID: <871wj658iv.fsf@gemini.sunstarsys.com> References: <87abxu5bfe.fsf@gemini.sunstarsys.com> <87648i5ac8.fsf@gemini.sunstarsys.com> <24066CA9-1CFB-4B83-B3AD-B34A2319ACC3@hybridized.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: adsl-065-012-220-185.sip.bct.bellsouth.net Mail-Copies-To: never User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) Cancel-Lock: sha1:QZUlXBN5YQ69IcPspOe3/m+PATs= Sender: news X-Virus-Checked: Checked by ClamAV on apache.org Andy Grundman writes: > On Mar 31, 2007, at 12:02 AM, Joe Schaefer wrote: > >> You're wandering into largely unchartered territory >> by using APR:: outside of mod-perl, so I would try >> to be conservative if possible, and follow the examples >> in the test code. APR::Pool has a good set of tests, >> so I'm really not sure the problem is there or somewhere >> in apreq's xs. It just stood out that you were using >> a new pool for each subroutine call, which probably >> isn't the best way to do things. > > OK, thanks for the advice. I'm actually a bit surprised this is > uncharted territory. Well I use it, but I don't know how many other people do. > I'm working on trying to improve the performance of Catalyst's body > parsing. We're currently using the all-Perl HTTP::Body, and it > actually beats APR::Request for urlencoded data. The regexes are > pretty simple, so this isn't too surprising. Still pretty impressive that you can do it faster than apreq2 can. Have you tried comparing it with apreq2's query string parser? That one's not stream oriented, so it should be a bit faster than our body parser. > Where I hope it will help a lot more is multipart/form-data parsing, but I > don't have this working yet to see. I also want to use it to replace some > uses of URI::Escape which is fairly slow compared to apreq. > > The reason I want it to work outside of Apache is so that people running > Catalyst is FastCGI mode Yeah. I've been hoping for a fastcgi module for apreq2 as well. > , or using one of the standalone Perl servers, can benefit from the > improved performance. I have a grand plan of building a standalone XS > module that does a lot of what apreq does, but without all the Apache > requirements. URI escaping/ unescaping, header parsing, cookies, > query strings, body data, etc. A lot of the apreq code could be used > in something like this I think. The barrier to entry with apreq is > pretty high at the moment, when compared to a standard CPAN module. One of our grand plans is to divorce APR from mod-perl iteself, so it can ship as a standalone set of wrappers for libapr and libaprutil. Another is to fold apreq2's stuff into the various projects it interacts with. That would significantly lower the barrier to entry for apreq, because it wouldn't even exist as a separate distribution anymore. It would just be part of all the other stuff. -- Joe Schaefer