quetz-mod_python-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Gallacher <jg.li...@sympatico.ca>
Subject Re: [mod_python] Sessions performance and some numbers
Date Sat, 09 Apr 2005 15:04:30 GMT
Barry Pearce wrote:
> I assume that session expiry and subsequent cleanup has been thought 
> of...so I wont go into any further detail on that tangent!

Yes, but the proposed code for FileSession could be a problem if there 
are a large number of sessions. The cleanup is run once in some random 
number of requests approximating 1000.

Psuedo code:

for sess_file in session_file_list:
     sess_data = cPickle.load(sess_file)
     if session_has_expired(sess_data):

Every session file is unpickled to see if the session has expired. This 
has GOT to hurt performance when the number of sessions rises to a 
significant number.


View raw message