Re: Strategies for tracking a tricky (typing) slowdown/lag bug
Re: Strategies for tracking a tricky (typing) slowdown/lag bug
- Subject: Re: Strategies for tracking a tricky (typing) slowdown/lag bug
- From: Jens Alfke <email@hidden>
- Date: Mon, 21 Sep 2009 17:42:57 -0700
On Sep 21, 2009, at 3:40 PM, Keith Blount wrote:
My app uses a heavily modified version of the OS X text system and
has some typing lag issues. Generally it has always been fine, but
in some circumstances typing would slow down (sometimes this is in
part attributable to the fault of the OS X text system itself,
which can slow to a crawl when trying to deal with even a few
thousand words of justified text, but mostly it seems to be the
result of a combination of factors in the highly customised and
subclassed version of the text system my app uses).
The text system is normally really fast. IIRC, it might have some
backward-compatibility hacks that will cause it to work less
efficiently if it finds that it's been customized in some deprecated
ways (instead of just failing.) Are you sure the techniques you're
using are the currently recommended ones and you're not using any
deprecated APIs?
Given that it gets slower over time and with typing, but clears out
as soon as it’s quit and re-launched, I figured this must be a
memory problem, but Leaks doesn’t seem to give me any useful
information
The first thing I would use is sampling. Use the 'sample' tool, the
sample command in ActivityMonitor, or Shark's CPU sampling mode to see
where the time is going. For things that require user interaction,
what I usually do is enter "sleep 5; sample MyApp 5" at a shell, then
immediately click into my app and start banging away at it so it's
busy when the sampling begins.
—Jens_______________________________________________
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