• 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: Load Tab View Items Lazily for Performance - How
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Load Tab View Items Lazily for Performance - How


  • Subject: Re: Load Tab View Items Lazily for Performance - How
  • From: Ken Thomases <email@hidden>
  • Date: Wed, 1 Dec 2010 14:00:00 -0600

On Dec 1, 2010, at 1:44 PM, Jerry Krinock wrote:

> The document window in a Core Data app has now grown to the point where it has several tabs and sub-tabs.  Some of them, a "Reports" tab in particular, can take a long time to load for large documents, so that upon opening such a document, the beachball spins while, mostly, array controllers for tables in unseen tab views are sorting their data.  This is annoying because, in typical usage, these unseen tab views are never selected.
>
> I think the solution is to load the slow-loading and rarely-used tab view items lazily, that is, not until they are selected.  Further, I think that the standard implementation of such lazy loading would be to go into the xib file, duplicate the long-loading and rarely-used tab view items, put their subviews in separate views, and move these separate views with their associated controllers into separate nib files.  It seems like I would have to leave empty tab view items in the "main" nib, and swap views from the other nibs in when required, or something like that.  I'd also have to similarly split up my File's Owner, taking the outlets and actions for each nib into a new File's Owners.
>
> Since this is looking like a multi-day endeavor, I'm asking for alternatives I should consider before diving in.

You might just not bind the array controllers' contentArray in the NIB and set up the binding when the tab is first selected.

Using free-standing views in separate NIBs is appealing, but does require the work you describe.  You might also just keep the free-standing views in the NIB that currently contains them, and swap them in when the tab is selected.  That would avoid much of the work.  However, the array controllers may still arrange their contents on instantiation, even if the only views which bind to them aren't in any window.  Not sure about that.

Regards,
Ken

_______________________________________________

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

References: 
 >Load Tab View Items Lazily for Performance - How (From: Jerry Krinock <email@hidden>)

  • Prev by Date: Load Tab View Items Lazily for Performance - How
  • Next by Date: forwarding Touch Events
  • Previous by thread: Load Tab View Items Lazily for Performance - How
  • Next by thread: forwarding Touch Events
  • Index(es):
    • Date
    • Thread