Re: [Core Data] Improve save performance ?
Re: [Core Data] Improve save performance ?
- Subject: Re: [Core Data] Improve save performance ?
- From: Bill Bumgarner <email@hidden>
- Date: Tue, 17 Jan 2006 10:39:46 -0800
On Jan 17, 2006, at 9:04 AM, Eric Morand wrote:
What would be a reasonable schedule ? 5 minutes ? In 5 minutes, my
software is able to import thousands of transactions from XML files
(for examples). If the Mac fails at 4:59, this is a lot a work to
be redone by the user
Pretty much the same question faced by SQLite.... how often would it
be reasonable to guarantee the bits make it down to the disk? ...
every other transaction? ... every 30 seconds (which is, more or
less, the system behavior prior to Tiger)?
Nasty problem, huh? If you want it fixed, complain to the drive
manufacturers as the fix really must be done in the drive controller
hardware.
Pretty easy actually.
I've detached the save call to another thread and, well, it works
perfectly and now when the user click on the "submit" button, there
is no pause for him since the save is done in the "background" thread.
That seems to solve all my problems.
Good. Now, just be really really careful with the locking. That
you are saving in the background thread as a part of the user
clicking a "submit" button implies that there is likely a UI refresh
happening at the same time. The UI refresh could cause faulting or
other write-like behavior. See the archives for numerous discussions
regarding threading and Core Data.
b.bum
_______________________________________________
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