[Catalyst-commits] r6251 - in trunk/Catalyst-Runtime: . lib/Catalyst

andyg at dev.catalyst.perl.org andyg at dev.catalyst.perl.org
Mon Apr 2 00:30:17 GMT 2007


Author: andyg
Date: 2007-04-02 00:30:12 +0100 (Mon, 02 Apr 2007)
New Revision: 6251

Modified:
   trunk/Catalyst-Runtime/Changes
   trunk/Catalyst-Runtime/lib/Catalyst/Engine.pm
Log:
Revert r6239, apreq stuff will go into the current branch, or I'll find another way to improve performance

Modified: trunk/Catalyst-Runtime/Changes
===================================================================
--- trunk/Catalyst-Runtime/Changes	2007-03-31 20:01:54 UTC (rev 6250)
+++ trunk/Catalyst-Runtime/Changes	2007-04-01 23:30:12 UTC (rev 6251)
@@ -5,8 +5,6 @@
           * $c->uri_for (approx. 8x faster)
           * $c->engine->prepare_path (approx. 27x faster)
           * $c->engine->prepare_query_parameters (approx. 5x faster)
-        - If libapreq2 is installed, URIs are decoded using a C function that is
-          approx. 12x faster than URI::Escape.
         - Updated HTTP::Body dependency to 0.9 which fixes the following issues:
           * Handle when IE sometimes sends an extra CRLF after the POST body.
           * Empty fields in multipart/form-data POSTs are no longer ignored.

Modified: trunk/Catalyst-Runtime/lib/Catalyst/Engine.pm
===================================================================
--- trunk/Catalyst-Runtime/lib/Catalyst/Engine.pm	2007-03-31 20:01:54 UTC (rev 6250)
+++ trunk/Catalyst-Runtime/lib/Catalyst/Engine.pm	2007-04-01 23:30:12 UTC (rev 6251)
@@ -20,11 +20,6 @@
 # Amount of data to read from input on each pass
 our $CHUNKSIZE = 64 * 1024;
 
-# See if we can use libapreq2 for URI unescaping
-use constant HAS_APR => eval {
-    require APR::Request;
-};
-
 =head1 NAME
 
 Catalyst::Engine - The Catalyst Engine
@@ -641,19 +636,14 @@
 
 =head2 $self->unescape_uri($uri)
 
-Unescapes a given URI using the most efficient method available.  Engines
-can subclass to provide faster implementations.
+Unescapes a given URI using the most efficient method available.  Engines such
+as Apache may implement this using Apache's C-based modules, for example.
 
 =cut
 
 sub unescape_uri {
     my $self = shift;
     
-    if ( HAS_APR ) {
-        # This function is ~12x faster than URI::Escape
-        return APR::Request::decode(@_);
-    }
-    
     my $e = URI::Escape::uri_unescape(@_);
     $e =~ s/\+/ /g;
     




More information about the Catalyst-commits mailing list