• 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
CoreData model optimization? (slow on insert with fetches)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CoreData model optimization? (slow on insert with fetches)


  • Subject: CoreData model optimization? (slow on insert with fetches)
  • From: "Hell's KItchen Hell's KItchen" <email@hidden>
  • Date: Tue, 2 Oct 2007 16:47:42 +0200

Hello,
I need to represent a schema for a messages archive program. Each
message, as like a nug have an unique msgid and some attributes as
Subject, Author, Posting date etc.
I've tried to do the schema illustrated below where author and subject
are separated entities and there are three kind of message (the root
is a simple article, then a root message that not contains a parent
but could contains childrens, and finally a child node that can have
both).

http://img408.imageshack.us/img408/6235/immagine1re6.png

Why?
I've tried to optimize the coredata engine because it seems to be very
slow when there are a large set of data (ideally i could have about
300 threads and 20,000 childs).

So I've created an entity rootnode because root nodes are few and it
could take less than scanning inside a list of simple childs only
roots.
I've also separated author and subject in order to prevent duplicate
texts (generally childs have the same subject of parent and an author
wrote lots of messages).

Unfortunatly it can't work well.
I need to test if article->root/child classes is a good idea but the
separate entities for subject and author are not good. Why? Because If
i try to insert 10,000 test data, Core Data need to search for an
existing author/subject and then it's need to associate it to the
message. It takes lots of time, about 30-40 seconds!

Any tips to optimize the model or any suggestions. I think I'm wrong
because Mail uses CoreData and it's seems to be good as speed.
Thank you a lot
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: CoreData model optimization? (slow on insert with fetches)
      • From: Andrew Farmer <email@hidden>
    • Re: CoreData model optimization? (slow on insert with fetches)
      • From: "I. Savant" <email@hidden>
  • Prev by Date: What should be the same object doesn't seem to be
  • Next by Date: Re: Sockets or NSStreams (was Re: mail-in db/app)?
  • Previous by thread: Re: What should be the same object doesn't seem to be
  • Next by thread: Re: CoreData model optimization? (slow on insert with fetches)
  • Index(es):
    • Date
    • Thread