Re: [Core Data] Improve save performance ?
Re: [Core Data] Improve save performance ?
- Subject: Re: [Core Data] Improve save performance ?
- From: Nazeeh ElDirghami <email@hidden>
- Date: Tue, 17 Jan 2006 08:46:17 -0800
I am not sure if you're doing this or not, but it's worth mentioning
anyway. Are you enclosing your transactions in "BEGIN;" and "COMMIT;"
statements? For example:
db.Execute ("BEGIN;");
loop
insert records
end
db.Execte ("COMMIT;");
I used this after having perf issues and it became much much faster.
Basically you're telling it to start a transaction and then end one.
Anything in between is not written to the DB instantly saving you a
lot of time. Specially all that house keep code that SqlLite executes
for every record. I might be wrong about the actual keywords used, I
haven't used this in a while now. Check SqlLite documentation for
"transactions".
Hope that helps.
On Jan 16, 2006, at 1:17 AM, Eric Morand wrote:
Hi !
Is there a way to improve the saving performance of a SQLite
persistent store ? On my respectable PowerMac 2x2,3Ghz, it takes
around one half of a second to save...one managed object !
I'm developing an accounting application and each new transaction
is saved to the persistent store when the user submit it. Well, let
me tell you that one half of a second if way too slow to be
acceptable - and I'm not even talking about the performances on
older computers than mine !
Maybe I should save the changes only when the user quit the
application (just like it is done by default) but if an user work
on the app for 2 hours and then a power failure happens, everything
would be lost !
Can anyone give me advice me on this ?
Thanks,
Eric.
=============================================
Automator Ketchup : http://automatorketchup.blogspot.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden