[Zope] Why can't I add lots of objects at once?

ender kthangavelu@earthlink.net
Wed, 11 Apr 2001 06:57:04 -0700


On Wednesday 11 April 2001 10:42, Kyler B. Laird wrote:
>>I've been working on an XML-RPC solution and it is
>>quite adequate for small data sets, but if I try to
>>add a few hundred student/class entires, it hangs.
>>
>>After a few iterations, I've come up with this script
>>on the Zope side.  Essentially, it creates a
>>structure like
>>	AAE
>>		203
>>			01
>>				01
>>					students
>>						kyler.b.laird.1
>>						sally.r.smith.5
>>
>>Terribly naive programming aside, what's wrong with
>>calling this a couple hundred times?  It seems to
>>just keep taking more and more of the processor
>>time.  Eventually I give up, kill the server and
>>restart it.  Then I can run the script again and it
>>will get a little bit further (because it doesn't
>>have to create the existing objects, I assume).

hi i'm a parrot from zope-dev:

in addition to chrisw's comments.

if any of these classes are by change catalog aware, thats probably your 
answer, since your doing incremental updates to the catalog for each add call.

if they are catalog aware, you're better off using a non-catalog aware class, 
and doing a batch catalog on them when you're done adding.

die parrot, die.

another option is try and store them in an intermediate format on the server, 
and then load them up all at once via an external method.

hth

kapil