• 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
NSRectFIll() taking 0.03 seconds, too slow?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSRectFIll() taking 0.03 seconds, too slow?


  • Subject: NSRectFIll() taking 0.03 seconds, too slow?
  • From: Hisaoki Nishida <email@hidden>
  • Date: Sun, 25 Sep 2005 15:33:37 -0700

Hi,

I am working on an app that requires a view (1024x768) to animate at 50fps+.
On my PowerBook 1.5GHz (ATI mobility Radeon 9700) a call to NSRectFill () is taking as long as 0.03 seconds, which alone translates to 33 fps--which I think is ridiculously expensive.


Reading suggestions from a similar post <http://www.cocoabuilder.com/ archive/message/cocoa/2003/9/29/91883>, I tried using a cached bezier path and call -fill instead of NSRectFill() (which supposedly makes a path every time it's called) but it takes just as much time. I also tried using an NSImage as a background and compositing it to the view every frame but this was also just as expensive.

One thing I could do to speed it up is only update where it's needed using NSRectFillList(), but my view is constantly half occupied, so this would only speed things up by 2x.

Aside from these, are there any alternatives? I would like to avoid OpenGL if possible, because it would require that I reconstruct much of my code, and since I am drawing texts, not polygons.

I don't have a better machine to test it on, so I was wondering if this is because my graphics card is too slow. But even then, 0.03 seconds seems too much.


Thanks,


-hyn

_______________________________________________
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


  • Follow-Ups:
    • Re: NSRectFIll() taking 0.03 seconds, too slow?
      • From: email@hidden
  • Prev by Date: Re: Round Image on Round Button
  • Next by Date: Re: Replacing the view in NSTabView
  • Previous by thread: Additional Favicon info using WekKit
  • Next by thread: Re: NSRectFIll() taking 0.03 seconds, too slow?
  • Index(es):
    • Date
    • Thread