• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [Core Data] Improve save performance ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >[Core Data] Improve save performance ? (From: Eric Morand <email@hidden>)

  • Prev by Date: Creating a single Tab Stop in an NSTextView
  • Next by Date: Re: [Core Data] Improve save performance ?
  • Previous by thread: Re: Core Data and multithreading (was Re: [Core Data] Improve save performance ?)
  • Next by thread: Text Layout
  • Index(es):
    • Date
    • Thread