• 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: modeling NSManagedObject with large binary data attribute
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: modeling NSManagedObject with large binary data attribute


  • Subject: Re: modeling NSManagedObject with large binary data attribute
  • From: Jesse Grosjean <email@hidden>
  • Date: Mon, 24 Oct 2005 16:06:45 -0400

First, "lazy loading" only applies with the SQLite store -- with the
XML and binary stores the whole data set is loaded into memory at once.
Second, all a managed objects attributes are loaded at the same
time. If you have an object with a 150MB attribute, that attribute
will be loaded at the same time the object is fetched.


Are you sure that the object in question is being fetched when your
application launches?  (That it itself is not a fault.)

For this reason I had been modeling this binary data attribute as a separate entity referenced by the original. This way I know that the binary data won't be loaded until it's explicitly accessed.

This is still a good way to approach the problem.

I'll go back to what I was doing, using a separate entity reference to mange this.


I got confused originally because my "Real" memory footprint in Activity Monitor wasn't going up significantly (using SQLite store) even when using an attribute to represent this data. But further testing shows me that the virtual memory was going up and it was also taking some time, so the binary data must have been loading in this case, it just didn't show up in the Activity Monitor as I was expecting.

Thanks for both of your help,

Jesse
_______________________________________________
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: 
 >modeling NSManagedObject with large binary data attribute (From: Jesse Grosjean <email@hidden>)
 >Re: modeling NSManagedObject with large binary data attribute (From: Chris Hanson <email@hidden>)

  • Prev by Date: Re: [ANN] Coalescing undo in Cocoa
  • Next by Date: Re: [ANN] Coalescing undo in Cocoa
  • Previous by thread: Re: modeling NSManagedObject with large binary data attribute
  • Next by thread: funky control behavior when in an NSDrawer
  • Index(es):
    • Date
    • Thread