Performance issues w/ keystroke events
Performance issues w/ keystroke events
- Subject: Performance issues w/ keystroke events
- From: email@hidden
- Date: Mon, 22 Oct 2001 18:18:46 -0700
I started working with cocoa/obj-c this last week (newbie alert), and have
a question about a performance issue related to key down events. I have a
simple app, built in Project Builder, consisting of a single window with a
single custom view which I use for OpenGL rendering. I have it setup to
render at 60hz, which is no problem for my simple scene with a few
animated, textured objects and simple lighting. CPU useage is < 1%. The
problem comes when key events get submitted to my view; performance goes
down the drain, with terrible stuttering at each key stroke or if I leave
a key depressed. The same thing happens when I run the "Cocoa InitGL" demo
found on the Apple developer website, in fact it seems even worse (perhaps
due to the additional timers it has running in the application loop). I
have poured over the Cocoa docs and haven't discovered any hints yet. So
my question is, what is a good strategy to capture key strokes without
severely impacting the performance of the rest of the application in a
Cocoa/ObjC app?
-stefan