• 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: NSMatrix and NSCell redraw performance
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSMatrix and NSCell redraw performance


  • Subject: Re: NSMatrix and NSCell redraw performance
  • From: John Hörnkvist <email@hidden>
  • Date: Tue, 15 Jan 2002 15:19:25 +0100

On tisdag, januari 15, 2002, at 01:52 , Stephan R. Cleaves wrote:

Hi,

I have custom NSMatrix and custom NSCell subclasses. The NSCell subclass does its own very minimal drawing, its really just a solid fill color and some text being rendered. The instance of my NSMatrix subclass is contained within an NSScrollView. I am getting quite bad performance on redrawing. For starters if a group of cells are drawn with their alternate background (still just a solid color) and I want to change the group back to its default background and select a different group to be drawn in its alternate background the operation appears to take up to 1 to 2 seconds. Admittedly sometimes its faster, but I'm more interested in getting it to be instantaneous all the time. When I first started I had been computing the range of cells at the time I wanted the redraw to occur, thinking this was causing my slowness problem I modified the code to pre-compute the ranges, there was effectively no improvement in speed. I had been telling the NSMatrix instance that it needed to be displayed, and so I went after that next and began to tell the individual cells to draw themselves. This seemed to yield some improvement in performance, but its still too slow. Now I'm wondering if the NSScrollView is more to blame. Any suggestions people have for improving the performance of this would be greatly appreciated.

How about providing some data?

Profile with gprof, or use sample or the Sampler application. That will provide a lot more information to base any advice on. You may also want to run QuartzDebug to catch multiple redraws.

Regards,
John Hornkvist
--
ToastedMarshmallow, the perfect Cocoa companion
http://www.toastedmarshmallow.com


References: 
 >NSMatrix and NSCell redraw performance (From: "Stephan R. Cleaves" <email@hidden>)

  • Prev by Date: multithreaded PDF Rendering
  • Next by Date: Re: NSWorkspaceDidTerminateApplicationNotification bug?
  • Previous by thread: NSMatrix and NSCell redraw performance
  • Next by thread: multithreaded PDF Rendering
  • Index(es):
    • Date
    • Thread