开发者

Optimizing an iphone app for 3G in landscape with opengl, camera, quartz

I have an iphone app that basically uses the camera, an opengl layer, and UIViews (some drawing with Quartz). It runs ok on 3GS, but on the 3G it is unusable. Particularly, when I press a UIButton, it literally takes sometimes 10 seconds to register the press. Shark doesn't do me much good because it crashes when I try to profile even a tiny portion, and I've tried turning off some of the layers to see if they might be obvious contributors to the lag. I've noticed that turning off the camera really helps.

I'm wondering if anyone has any familiarity with this 开发者_如何学Pythonand might suggest some likely causes. I had issues with extreme slowdown from running my app in landscape mode and using transforms, so considered that might be a cause, but I'm wondering if hoping for a 3G to run something with all of the above elements is just not really possible considering the camera seems to really cost a lot.

The fact that the buttons are horribly delayed in their response makes me think there is something fundamental that I might be missing.


If it takes 10 seconds to respond at all, that means events on your main thread are being queued faster than they can be processed. That is a very bad thing. There are a number of ways to combat this depending on how you've designed your application

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜