• 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
Want NSTableView NSOutlineView to load lazy like iOS?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Want NSTableView NSOutlineView to load lazy like iOS?


  • Subject: Want NSTableView NSOutlineView to load lazy like iOS?
  • From: Jerry Krinock <email@hidden>
  • Date: Mon, 15 Sep 2014 11:52:55 -0700

OS X app has an NSOutlineView with a data source.  Clicking on a disclosure triangle to expand an item that has 13,000 children causes its data source to immediately receive -outlineView:child:ofItem: 13,000 times, on the main thread.  The app presents a beachball until it’s over, which is unacceptable.

I think that Cocoa should know how many rows can fit in the window, stop beachballing and redraw after these two dozen or so rows plus a little more have been fetched, as UIFetchedResultsController does with its batch size in iOS.

The observed behavior seems to be at odds with what I read in the AppKit Release Notes for Yosemite:

"Normally, a table view will only keep around a subset of the total number of rows potentially available (in general, this is limited to the visible region, plus some overdrawn allowance for responsive scrolling).”

It would be nice!  Is that correct?  If so, how might my outline view be abnormal?  My data source is backed by Core Data, but I don’t think that matters to this issue.  Below is a call stack of how my data source gets a typical one of those 13,000 messages.

Thanks,

Jerry

#0	 in -[JerrysDataSource outlineView:child:ofItem:] at /path/to/JerrysDataSource.m
#1	 in loadItemEntryLazyInfoIfNecessary ()
#2	 in -[NSOutlineView _rowEntryForChild:ofParent:requiredRowEntryLoadMask:] ()
#3	 in -[NSOutlineView _expandItemEntryChildren:atStartLevel:expandChildren:andInvalidate:] ()
#4	 in -[NSOutlineView _expandItemEntry:expandChildren:startLevel:] ()
#5	 in -[NSOutlineView _batchExpandItemsWithItemEntries:expandChildren:] ()
#6	 in -[NSOutlineView expandItem:expandChildren:] ()
#7	 in -[NSOutlineView _doUserExpandOrCollapseOfItem:isExpand:optionKeyWasDown:] ()
#8	 in -[NSOutlineView mouseTracker:didStopTrackingWithEvent:] ()
#9	 in -[NSMouseTracker stopTrackingWithEvent:] ()
#10	 in -[NSMouseTracker trackWithEvent:inView:withDelegate:] ()
#11	 in -[NSOutlineView mouseDown:] ()
#12	 in -[JerrysOutlineView mouseDown:] at /path/to/JerrysOutlineView.m

I presume the bottom line #12 is the mouse click on the disclosure triangle.
_______________________________________________

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: Want NSTableView NSOutlineView to load lazy like iOS?
      • From: Ken Thomases <email@hidden>
    • Re: Want NSTableView NSOutlineView to load lazy like iOS?
      • From: Kyle Sluder <email@hidden>
  • Prev by Date: Re: Swift Compiler Bug?
  • Next by Date: Re: Want NSTableView NSOutlineView to load lazy like iOS?
  • Previous by thread: Can't get Service to run.
  • Next by thread: Re: Want NSTableView NSOutlineView to load lazy like iOS?
  • Index(es):
    • Date
    • Thread