On Jan 7, 2009, at 11:14 AM, Tycon wrote:

I agree that it's better to let users set the "dirty" flag if they
want.

It would also be great if you can change the Session.load() method to
NOT save the session immediately after loading it (not at the end of
the request), as is the case today. This auto-saving upon first access
is quite useless because subsequent changes to the session during the
same request need to be saved separately afterwards. The Session.load
() method can set the "dirty" flag if the "autosave" options is
"if_accessed".

Together these changes can help avoiding the multiple save() that is
happening today every time the session is used.

Definitely. I'd be happy to review a patch to the code if you'd like to add these features, right now I'm heavily focused on Pylons 0.9.7 release so it'll be a few weeks before I can get back to the Beaker code-base myself. Feel free to email me directly about any patches (with unit tests) to this and I can apply them.

I'm sure your suggestion of not saving immediately upon load will also help session performance, which has been one of our goals for awhile too.

Cheers,
Ben

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to