From: Oleg B. <ph...@ph...> - 2004-05-07 14:43:16
|
Hi! A few weeks ago I complained about slowness of SQLObject.new(): http://article.gmane.org/gmane.comp.python.sqlobject/1443 The figures are: QPS-based script does 180 INSERTs per second, SQLObject does 2 or 3 :( QPS-based script runs 3 minutes, SQLObject-based - 2.5 hours )': I patched SQLObject a bit (the patch is attached). In short, the patch prevents SELECT after INSERT. This is not a universal patch, of course - just an ugly hack to do an experiment. Well, now SQLObjects does 120 INSERTs per second and the script runs 4.5 minutes. Much better! So SQLObject by itself is not very slow - it is that excessive SELECT that makes things so slow. Now I need to invent a patch to disable it. In my opinion the simplest way will be to pass a row of values to the _init() from _SO_finishCreate(). Is it a correct way? Oleg. -- Oleg Broytmann http://phd.pp.ru/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |