Re: Optimizing NSView's drawRect
Re: Optimizing NSView's drawRect
- Subject: Re: Optimizing NSView's drawRect
- From: Daniel Jalkut <email@hidden>
- Date: Wed, 23 Nov 2005 23:34:52 -0500
On Nov 23, 2005, at 11:00 PM, David Chan wrote:
Any idea how I should optimize my program or what could possibly
went wrong
with my program? Thanks alot..
Hi David - the best thing would be for you to become acquainted with
Shark, part of the CHUD tools from Apple. These tools are an optional
part of the Xcode install. Once you've installed them, take a look at
this article:
http://developer.apple.com/tools/sharkoptimize.html
Shark has a bit of a learning curve, but you can capture a lot of
information from the very beginning without learning too much. I
would recommend the following as a "first step" in debugging your
performance problems:
1. Launch your application.
2. Launch Shark, and target your application with "Time Profile."
3. Activate your application, and "start Shark" by hitting Opt-Escape.
4. Immediately start scrolling your "zoom slider."
5. After some time, deactivate Shark by hitting Opt-Escape again.
You will get some performance analysis from Shark that should prove
very informative. Here you will see whether all of your time is spent
in "drawRect:" as you fear, or whether it's spent elsewhere.
You will probably have to review the documentation at least a bit
before you get the hang of how to get the information you require out
of Shark.
Good luck,
Daniel
_______________________________________________
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