[Zope] Why do I have to reimport External Methods ?

Quinn Dunkan quinn@challenge.calarts.edu
Sat, 20 Mar 1999 19:25:19 -0800


> On Sat, 20 Mar 1999, Jeff Bauer wrote:
> 
> > "James A. Hillyerd" wrote:
> > > If I do have to continue the shutdown/restart process, is 
> > > there any way of tuning PCGI so that it loads up faster?
> > 
> > In the pcgi/Util directory, you'll find a killpcgi.py 
> > script.  You could hack it to perform a restart, i.e.
> > launch a new pcgi process after killing the old one.
> > This would speed up your initial connect time and be
> > much faster during debugging (multiple restarts).
> > 

A simple way that works for me is, when debugging, have a normal cgi version
postfixed with -c and use that.  This brings me to another thing:  the default
zope distribution doesn't include ZCGI and friends, I assume because Zope
users supposedly have no interest in normal cgi.  I think it should be
included anyway, so that Full Zope is a superset of Only ZP/ZT.  That's more
intuitive, and then you don't have to download both if you want to use both :)
And ZCGI.py is only a small text file, after all.  And perhaps zope users are
interested in ZCGI after all, or does zope make assumptions about running
persistently (can't see how it could, without violating http's statelessness).

And as far as tuning pcgi: you could shorten pcgi_socket():delay
or the 2 second sleep() at the end of pcgiStartProc().  The first one could
probably be pretty safely shortened with the miniscule cost of a chance of a
few extra connect() calls, but the second one should probably stay the same,
although I'm not clear on its purpose (give time for the child to sort itself
out?).

Here's a random question: how come the win32 pcgiConnect uses CONNDELAY
(defined in pcgi.h as 1), while the unix version says int delay=1; ?

See, that's the problem with open source: all sorts of grubby randoms can go
rooting through your code :)