background preloader

Performance

Facebook Twitter

iOS performance: tips and tricks to do it better. Nshipster. Abstractions are necessary for doing meaningful work, but they come at a cost. To work at a high level is to turn a blind eye to nonessential details in order to reason with larger logical chunks. Determining what information is important within a particular context, however, is challenging, and is at the heart of performance engineering. By benchmarking, a programmer can uncover the hidden performance characteristics of their code, and use this information to optimize accordingly.

It is an essential tool for any developer interested in making their apps faster (which is to say every self-respecting developer). The etymology of the word "benchmark" can be traced back to 19th century land surveying. In programming, there is a minor semantic distinction between a benchmark and the act of benchmarking: A benchmark is a program made specifically to measure and compare broad performance characteristics of hardware and software configurations. Benchmarking Performance in Objective-C Results. Texture size limits ? Horseshoe7 Participant @horseshoe7 This could be a general question for Cocos2D if not Cocos3D. Does the framework find a way around texture size limits of the various devices? Some devices can do 2048×2048, but older ones 1024×1024. I’m thinking of backwards compatibility with older devices right now since my only test device is a iPod touch 4. paris18m @paris18m use 2048×2048 textures for iphone 4 Retina and use 1024×1024 textures for iphone 3gs basicly 1/2 scale of the above.

Also 2048×2048 textures assets can be used with the iPad Is that the limit on how much I can have ? Birkemose Keymaster @birkemose No. How many you can have, depends on pixeldepth and compression. Oh, great to know! I think I just answered my own question. the answer would seem to be yes…? Change Max Texture Size? Bcarbone Participant @bcarbone Hello, I am in the process of developing a game (can’t tell. it’s a secret!

:p) and I have a map that I can scroll around with my finger. I found a way to scroll on a very high res (1024×1024) image with 60FPS. Thanks in advance! Brandon jamesgrote @jamesgrote You can’t change the max texture size as that is device dependent. - Older devices: iPhone 3G have max size of 1024×1024. - iPhone 3GS and iPad have max size of 2048×2048. You would need to scale your image to the max supported size before creating a texture from it. Blue Ether @blue-ether Ha, yes the max texture size is not, in fact, an arbitrary and unnecessary limitation. MisterX @misterx How do you limit an iPhone App to working only with 3GS or newer devices?

I am working on an iPhone version of my game. Birkemose Keymaster @birkemose In compiler settings, you only compile for armv7. Thanks Birkemose! Does anyone happen to know if the 2nd Gen iPod touch 8GB devices support armv7 and 2048 x 2048 textures? Cybergreg. Understanding pixel format in cocos2d v0.7.3 | cocos2d for iPhone. Performance tips.