[Catalyst] Slowness on test server caused by reverse DNS lookups

Eric K. Olson olson at mauicomputing.com
Tue May 30 02:54:49 CEST 2006


Hi Folks!

In writing my first Catalyst Application (and may I say THANK YOU for creating this framework!),
I noticed a long delay on every request, which I traced to the reverse DNS lookups of the server
and client IP addresses in Catalyst::Engine::HTTP::_socket_info.  I patched it to have '-nodns'
and '-noremotedns' to turn off the server and client reverse DNS lookups, respectively.  That patch
appears below, including a patch to the Helper that generates the myapp_server.pl code.

I realize that the test server is just for getting people up and running quickly, but I think it
is important that it have good response time, even in the face of badly configured (or impossible
to properly configure) reverse DNS records.  I initially attributed the delay to actual processing,
which made Catalyst look REALLY slow.  It was 100% DNS timeouts-- even with the test server my
App (using TT and DBIC::Schema) is REALLY fast.

Questions:

1. Is it appropriate to post this patch here, or should I be contacting the maintainer of that
package directly?

2. I created an instance variable _options to hold the options hash, rather than passing it down
into _handler() and then into _socket_data().  I was surprised it wasn't already an instance variable.
Is this an OK thing to do?  Is there a coding style standard somewhere?

3. I also created an accessor method options() in Catalyst::Engine::HTTP, but not a setter method.  I
was surprised that C:E:HTTP didn't inherit from a superclass providing generic accessor/setters for
all the instance variables.  Was this an OK thing to do?

Basically, if I want my patches to be rolled into the official Catalyst, I need to know if I'm doing
things appropriately.  Any constructive input is welcome.

Once again, thank you folks SO much for making web development fun and interesting again!

Cheers,

-Eric
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch.txt
Url: http://lists.rawmode.org/pipermail/catalyst/attachments/20060529/da879a05/attachment.txt 


More information about the Catalyst mailing list