[mod_python] Multiple functions

Jim Gallacher jpg at jgassociates.ca
Mon Feb 26 08:09:33 EST 2007

Peter Sanchez wrote:
> On Feb 25, 2007, at 7:49 AM, Jim Gallacher wrote:
>> Peter Sanchez wrote:
>>> This may be a weird question. I have a site running off a single 1U 
>>> that is serving more than 10M page views per month. It is 100% in 
>>> mod_python using publisher. I have done what I can to increase 
>>> performance server wise and I do need to add a second server to help 
>>> with the load. I am wondering if I can speed it up a bit in the code 
>>> itself by splitting it into multiple files.
>>> Currently I have 90% of the code in a single index.py file. All "web" 
>>> end functions reside there. I assume it would be faster to have a 
>>> browse.py instead of a browse() function in index.py. Is this 
>>> thinking correct? My logic is the engine will just need to read the 
>>> browse function instead of the entire index.py file, then use the 
>>> browse only function.
>>> All advice is welcome and appreciated!
>> Are you using sessions?
> I am using a Cookie which contains a key, and they session data is 
> stored on the back end.

I should have asked if you where using mod_python's built-in session 
handling, as there may be some things that can be optimized there. In 
your particular case I have nothing to offer.


More information about the Mod_python mailing list