On Fri, 17 Jun 2005, Jim Gallacher wrote:
**** Brain Wave ****
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 50,000 records. At that point I
start to see period performance hits due to disk syncing, but that is to be
expected.
I have no idea what to do with this knowledge unless we can figure out a way
to keep the dbm file open across multiple requests. Ideas??
I seem to remember that that no free dbm implementation supports
concurrent access (which you'd need for prefork mpm). I think the
commercial version by sleepycat does, but who cares about that...
Grisha