iphone - Performance-wise: A lot of small PNGs or one large PNG? -


Developing a simple game for the iPhone, what is a better performance?

  1. Use very small (10x10 to 30x30 pixels) PNG for my UVV background
  2. Using a large PNG and clipping the boundaries of my UIVV.

My idea is that the first technique requires less memory per person, but it makes complicated how iPhones handle large amounts of images, because It tries to combine images into large textures or on the other hand, on the other hand, the iPhone only gets the chance to handle a large PNG, but increasing the image weight infinitely to carry each UIIV It is.

  • Am I right about iPhone's efforts, managing the images I've described?
  • So, what's the way to go?

The answer is still to be seen, still there seems to be a trade-off with two parameters: complexity and CPU-intensive coding what techniques to use Will my tipting point for?

If you end up with the same CGImageRef (for example by sharing a UIImage *) If you mention, the image will not be loaded with different views several times. Used by this technique. This is the OSX code, but UIViews are similar to CALayers.

The way in which core graphics manages images (anyway from my observation) is loading in heavy time and when the storage is tight then aggressive is released. / P>

Using a large image, you can load the picture on the draw time if memory for the decoded image that indicates CGImageRef is retrieved by the system.

Does it matter how many pictures you have, but how often the UIIC is running in your code.

Both UIViews and Core Animation CALayers will only be repainted if you ask them ( -setNeedsDisplay ), and spout is usually your code and rendered pasted content Moves the graphic to the chip.

So my advice is to understand your UIView layout in such a way that all the changes can be updated together. At the same time, which are converted into a single texture upload.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -