Re: [Core Data] Improve save performance ?
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