Re: Lots of EOs slow down the performance
Re: Lots of EOs slow down the performance
- Subject: Re: Lots of EOs slow down the performance
- From: Mike Schrag <email@hidden>
- Date: Thu, 6 Nov 2008 16:55:05 -0500
Other ORM tool
like activerecord or python.db seems don't have the concept of EC;
they just invoke save() on each objects. In this case, activerecord or
python.db are not likely devour all the memory because each object
could be collected after they're saved.
No matter what ORM you use, if it has the concept of a transaction,
they're holding the objects in memory. I don't think other ORMs will
be particularly better or worse at memory management than EOF. You
take some hit for storing state in dictionaries, etc instead of
directly in your object, but I'm not sure this is REALLY that big of a
deal .. I can't imagine you're talking more than a couple megs of
memory for that difference.
Performance: I did some benchmark on my database. 150,000 insertion on
the same table:
Raw SQL, transaction: 23s
Raw SQL, no transaction: 154s
EC, saveChanges every 1000 EO inserted: 273s
Did you measure where exactly this time is going? Depending on your
plugin impl, PK generation could definitely going to be a huge hit
that you're probably dodging with raw SQL. Beyond that, if you're not
using "tricks" (PreparedStatements and batch inserts), I don't know
that there should really be all that much of a difference, but this
might be a naive comment -- I'll have to think about it some more. 10x
speed difference seems like we could definitely fix ...
ms
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden