Re: Session Benchmarks

2005-06-18 Thread Nick
Jim Gallacher wrote: Using bsddb3 would introduce new dependency for mod_python, so I don't know if it's a good idea to use transaction handling by default for DbmSession. Maybe we could offer a subclass? Starting with Python 2.3 this module is included in the standard python distribution as

Re: Session Benchmarks

2005-06-18 Thread Jim Gallacher
Nick wrote: Jim Gallacher wrote: Using bsddb3 would introduce new dependency for mod_python, so I don't know if it's a good idea to use transaction handling by default for DbmSession. Maybe we could offer a subclass? Starting with Python 2.3 this module is included in the standard python

Re: Session Benchmarks

2005-06-18 Thread Jim Gallacher
Nick wrote: Jim Gallacher wrote: Nick wrote: Jim Gallacher wrote: Using bsddb3 would introduce new dependency for mod_python, so I don't know if it's a good idea to use transaction handling by default for DbmSession. Maybe we could offer a subclass? Starting with Python 2.3 this

Re: Session Benchmarks

2005-06-17 Thread Gregory (Grisha) Trubetskoy
On Fri, 17 Jun 2005, Nicolas Lehuen wrote: As for the MySQL implementation I'd stay away from anything vendor-specific in mod_python, because then the question becomes why not a postresql, why not oracle, etc. Grisha

Re: Session Benchmarks

2005-06-17 Thread Jim Gallacher
Gregory (Grisha) Trubetskoy wrote: On Fri, 17 Jun 2005, Jim Gallacher wrote: I was thinking we'd still use the current global locking scheme, but keep the file open between requests. Not sure if this would be robust or just asking for dbm file corruption though. I'm pretty sure it won't

Re: Session Benchmarks

2005-06-17 Thread Jim Gallacher
Gregory (Grisha) Trubetskoy wrote: On Fri, 17 Jun 2005, Jim Gallacher wrote: Any objection to just a SqlSession base class? May be - it depends on how complex it becomes. Any attempts I've to generalize SQL/DB stuff tend to become a mess since there are no firm standards in this area,

Re: Session Benchmarks

2005-06-17 Thread Nicolas Lehuen
2005/6/17, Jim Gallacher [EMAIL PROTECTED]: Nicolas Lehuen wrote: Hi Jim, You've done a pretty impressive work here. What surprises me is the O(n) behaviour on DBM and FS. This seems to mean that indexes (or indices, if you prefer) ar not used. ext2/ext3 uses a linked list to access

Re: Session Benchmarks

2005-06-17 Thread Jim Gallacher
Nicolas Lehuen wrote: Anyway, implementing FS2 instead of FS is not that difficult, and if it yields predictable results even on ext3, then we should go for it. Already done - it's just a couple of extra lines. Doing some testing today. Are you replacing FS with FS2 or adding a new

Re: Session Benchmarks

2005-06-17 Thread Nick
Jim Gallacher wrote: It just occured to me that the performance problem may be related to opening and closing the dbm file for every record insertion. Adjusting the test so that the file is only opened once, I get O(1), and a great speed boost: 0.2 seconds / per 1000 records all the way up to