> On 5 Jul 2017, at 5:21 am, Quincey Morris 
> <quinceymor...@rivergatesoftware.com> wrote:
> 
> OTOH, before you go to too much more trouble with this, it seems to me that 
> your next step is to convert to a view-based table view. It’s really not that 
> much work, and cell-based table views were deprecated in 10.10, which is 
> basically 3 years ago.
> 
> If you have to submit a bug report, I think you’ll get a better outcome if 
> you’re not complaining about a long-deprecated feature.


I do take your point, and I’m considering this.

However, as of the latest documentation I can find, cell-based tables are not 
exactly deprecated. They’re just treated as the embarrassing brother no-one 
talks about, which is not quite the same thing:

"NSCell-based tables continue to be supported in OS X v10.7 and later, but 
they’re typically used only to support legacy code. In general, you should use 
NSView-based tables.”

This is legacy code, and a standard no-frills cell-based table is perfectly 
adequate to display it. Until they are officially deprecated, they should still 
perform adequately. I can certainly imagine they get no love inside Apple, but 
that’s all the more reason to suspect that there’s been an oversight in testing 
cell-based drawing with the new transparency effects.

> Again, does the problem disappear if you don’t have any popups in your UI. 
> (The answer was no, not completely, before.) If there’s something going on 
> *besides* the way popups are drawn, you shouldn’t get too fixated on those.
> 

Replacing the pop-ups with a text cell, the problem does disappear, pretty much 
entirely. Previously, without layer backing there was still some sluggishness 
(maybe 10 frames per second when scrolling, versus 1 frame every 2 seconds), 
but with layer backing there are no obvious delays at all. Instruments does not 
show any significant time spent rendering the table view (I can’t even find an 
entry for that, it’s swamped by the main content redraw of my app, which is 
what I would expect).


In any case, I am able to reproduce the problem in a test app that does nothing 
except draw a long cell-based table with pop-ups. If I use text cells, it’s 
fine. Add pop-up cells, it tanks. The stack trace is the same as my app.

7.02 s   86.4%  0 s                                             -[NSTableView 
drawRect:]
7.00 s   86.1%  0 s                                              -[NSTableView 
drawRowIndexes:clipRect:]
6.99 s   86.0%  0 s                                               -[NSTableView 
drawRow:clipRect:]
6.94 s   85.3%  0 s                                                
-[NSTableView _drawContentsAtRow:column:withCellFrame:]
6.68 s   82.2%  1.00 ms                                             
-[NSPopUpButtonCell drawWithFrame:inView:]


If anyone can offer a place to host the project, I’d be happy to share it, and 
see whether the problem is seen by others. (I no longer have file hosting 
services).


—Graham


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to