• 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: Eric Morand <email@hidden>
  • Date: Tue, 17 Jan 2006 01:17:34 +0100


Instead, SQLite sends a F_FULLFSYNC request down to the kernel. This causes the kernel to flush all buffers to the drives and causes the drives to flush their track caches. Without this, there is a significantly large window of time within which your data is going to be sitting in volatile memory.

There was a pragma command to change the synchronous value in SQLite, no ?




Anyway, SQLite persistent store is unusable for me. Here is what I've been doing to test its performance :

- (IBAction) saveAction:(id)sender
{
NSEntityDescription * anEntity = nil;
NSManagedObject * anObject = nil;

int index = 0;

while ( index < 1000 )
{
anEntity = [NSEntityDescription entityForName:@"Account" inManagedObjectContext:[self managedObjectContext]];
anObject = [[NSManagedObject alloc] initWithEntity:anEntity insertIntoManagedObjectContext:[self managedObjectContext]];

NSLog (@"save");

[[self managedObjectContext] save:nil];

NSLog (@"end save");

index++;
}
}


Remembre that the Account Entity is the only entity in the model and that it has no property, and no relationship ! So this is not model- related.

Well, this process (saving 1000 different object in the store, one at once) took...7 minutes !!!




How can one feel satisfied with such subpar performances ?


Eric. _______________________________________________ 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
  • Follow-Ups:
    • Re: [Core Data] Improve save performance ?
      • From: Shawn Erickson <email@hidden>
    • Re: [Core Data] Improve save performance ?
      • From: Bill Bumgarner <email@hidden>
References: 
 >[Core Data] Improve save performance ? (From: Eric Morand <email@hidden>)
 >Re: [Core Data] Improve save performance ? (From: AurĂ©lien HugelĂ© <email@hidden>)
 >Re: [Core Data] Improve save performance ? (From: Eric Morand <email@hidden>)
 >Re: [Core Data] Improve save performance ? (From: mmalcolm crawford <email@hidden>)
 >Re: [Core Data] Improve save performance ? (From: "Timothy J. Wood" <email@hidden>)
 >Re: [Core Data] Improve save performance ? (From: Eric Morand <email@hidden>)
 >Re: [Core Data] Improve save performance ? (From: Kay Roepke <email@hidden>)
 >Re: [Core Data] Improve save performance ? (From: Eric Morand <email@hidden>)
 >Re: [Core Data] Improve save performance ? (From: Scott Ellsworth <email@hidden>)
 >Re: [Core Data] Improve save performance ? (From: Eric Morand <email@hidden>)
 >Re: [Core Data] Improve save performance ? (From: Bill Bumgarner <email@hidden>)

  • Prev by Date: Re: [Core Data] Improve save performance ?
  • Next by Date: Re: Obj-C from JavaScript, Google Map event listeners in a WebView.
  • Previous by thread: Re: [Core Data] Improve save performance ?
  • Next by thread: Re: [Core Data] Improve save performance ?
  • Index(es):
    • Date
    • Thread