Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Performance problems on iPad Retina
Started by cublah Oct 13 2013 08:49 AM

14 replies to this topic
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

cublah

[GLOBAL: userInfoPane.html]
cublah
  • Contributor

  • 379 posts
  • Corona SDK

Ok so I'm just starting a new project and thought hey, I'm not too far into it lets change it to use the new graphics 2.0.

 

There weren't many changes and I did it step by step to make sure I got everything working as was with v1, the main changes were the reference points and changed them to anchor points. 

 

All went well and it worked well on my new iPhone 5S and iPad Mini (both running 7.02) so I thought lets load it up on my iPad 3 (running 7.02) since I have retina graphics, looks good except there is a definite lag when I am dragging things around the screen and the transitions were slow or skipping.

 

I thought maybe I missed something, so I undid the changes one by one and tried each version on my iPad 3, it only became smooth when I didn't use graphics 2.0.

 

I'd like to upload the files but there are a quite a few and I don't really have time to make a demo project but I thought I would bring it to the attention of the masses and the management, to see if anybody else sees the same problem.



[TOPIC: post.html]
#2

ingemar

[GLOBAL: userInfoPane.html]
ingemar
  • Corona Geek

  • 2,733 posts
  • Enterprise

Hmmm.

I just tested a Graphics 2.0 build on my iPad 3 (iOS 7.0.2) and my physics based app with Partice Candy and transitions is behaving as expected as far as I can see...



[TOPIC: post.html]
#3

CineTek

[GLOBAL: userInfoPane.html]
CineTek
  • Contributor

  • 310 posts
  • Corona SDK

I can confirm this issue on iphone4.

 

It´s 100% the same code except for this.

 

display.setDefault( "background", 0.5, 0.2, 0.1, 0.5 )
display.setDefault( "lineColor", 0, 0, 0, 0.1)
display.setDefault( "fillColor", 0, 0, 0)

 

I am using Raycasting with 200 lines on screen but I just call it once in createScene event.

 

Build using graphics 2.0: <28 fps

old engine: 50-60 fps



[TOPIC: post.html]
#4

cublah

[GLOBAL: userInfoPane.html]
cublah
  • Contributor

  • 379 posts
  • Corona SDK

Hmmm.

I just tested a Graphics 2.0 build on my iPad 3 (iOS 7.0.2) and my physics based app with Partice Candy and transitions is behaving as expected as far as I can see...

Do you have a retina sized background screen?

 

I just took the background screen out and it runs smoothly, not sure wether that's because its a big asset (2048x1536) or it's part of the problem.

 

Obviously I need my background screen so it's not a solution :P



[TOPIC: post.html]
#5

richard770

[GLOBAL: userInfoPane.html]
richard770
  • Contributor

  • 112 posts
  • Corona SDK

I am still having issues with my app when built for device using G2.0 builds.... 

@cublah.. I'll try remove any large back ground images.. cause I too have a fairly large one... I wonder if we have a texture memory issue.. which we cant see cause texturememory reporting is broken in g2.0 builds? well mine aint reporting memory use anyway... it just reports zero



[TOPIC: post.html]
#6

richard770

[GLOBAL: userInfoPane.html]
richard770
  • Contributor

  • 112 posts
  • Corona SDK

Just removed my background image... a 1136x880 image.... and I got a 2 fold increase in framerate... ie... I am now getting about 20fps... was getting <10fps... in an app that runs at 60fps in sim and on device when built with G1.0 builds....

 

Like I said, I cant see my texture memory used cause that function aint working anymore... 

 

This is not right!



[TOPIC: post.html]
#7

richard770

[GLOBAL: userInfoPane.html]
richard770
  • Contributor

  • 112 posts
  • Corona SDK

@ingemar...... would you mind adding a large background image to your app thats working fine with G2.0 ...and test it..... see if you get a severe drop in frame rate? 

Would really appreciate you taking the time

Cheers



[TOPIC: post.html]
#8

ingemar

[GLOBAL: userInfoPane.html]
ingemar
  • Corona Geek

  • 2,733 posts
  • Enterprise

Strange. I use a huge graphic on the iPad Retina.

 

I use background images with bleed zones to make sure it covers all kinds of screen sizes (using letterbox mode).

This makes my iPad Retina background graphic 2440 × 1680 pixels, and I have had no problems with it on the iPad Retina.

 

The sizes are:

610 x 420 (normal)

1220 x 840 (@2x)

2440 x 1680 (@2x~ipad)

 

with the following in config.lua:

imageSuffix = {
    ["@2x"] = 1.4,
    ["@2x~ipad"] = 3.4
}

 

 

I don't use ray-casting and there's not a lot of action in the scene at any one time. At most there are about 10-20 objects active in each frame and on average there are less than 10.

 

I only use physics and sprite-animation in the app.



[TOPIC: post.html]
#9

richard770

[GLOBAL: userInfoPane.html]
richard770
  • Contributor

  • 112 posts
  • Corona SDK

see my latest  comment on other thread

http://forums.coronalabs.com/topic/40370-frame-rate-when-build-for-xcode-sim-or-device/

 

Maybe we can continue on one of these threads... Im jumping between both now :)



[TOPIC: post.html]
#10

Bryan01

[GLOBAL: userInfoPane.html]
Bryan01
  • Enthusiast

  • 95 posts
  • Corona Staff

@richard770

 

We're still tuning, but I wanted to check back in and see if you had a chance to test your app with the latest changes for performance. We have made a few optimizations.



[TOPIC: post.html]
#11

richard770

[GLOBAL: userInfoPane.html]
richard770
  • Contributor

  • 112 posts
  • Corona SDK

[TOPIC: post.html]
#12

phoenixongogo

[GLOBAL: userInfoPane.html]
phoenixongogo
  • Enthusiast

  • 59 posts
  • Corona SDK

Hi all,

 

I have noticed my apps runs smoothly on iPhone 5 but not on iPad mini with Retina.

even after switched @4x images to @2x, the performance only gain a little improvement.

 

Almost all images(UI,sprites,particles) in my apps are display via image sheet with 1024x1024 for @2x and only one 2048x2048 @2x sheet. using build 2393.

 

Any tip for how to improve the performance on iPad Retina?

 

Here are the app links if you like to see the performance difference:

http://itunes.apple.com/app/id896506539

http://itunes.apple.com/app/id896506813



[TOPIC: post.html]
#13

bjsorrentino

[GLOBAL: userInfoPane.html]
bjsorrentino
  • Veteran

  • 8,506 posts
  • Corona SDK

Hi @phoenixongogo,

Did you confirm that it's definitely choosing the @2x images on the iPad Retina? Depending on your scale setup, it might still be using the @4x ones. Of course, it's possible to "max out" any app with too many images being loaded into texture memory, and the iPad Mini might be struggling a bit because of that.

 

Take care,

Brent



[TOPIC: post.html]
#14

ingemar

[GLOBAL: userInfoPane.html]
ingemar
  • Corona Geek

  • 2,733 posts
  • Enterprise

@phoenixongogo

If you have performance issues, I recommend using RG Super Meter from roaminggamer to identify any issues with memory.

http://roaminggamer.com/makegames

 

You'll see RG Super Meter listed on that page.



[TOPIC: post.html]
#15

phoenixongogo

[GLOBAL: userInfoPane.html]
phoenixongogo
  • Enthusiast

  • 59 posts
  • Corona SDK

@Brent 

@ingemar

 

Thank you ingemar for the sharing, it’s a nice tool.

Here is the test result via using RG Super Meter in @2x image sheets and all value are approximately:

Device        FPS      MEM      VMEM   Image Suffix

iPhone 5     avg 37   3.5mb    74mb     @2x

iPad Mini2  avg 42   3.5mb     82mb    @2x

 

But when play without RG Super Meter, the performance on iPhone 5 is went well and more smoother than on iPad Mini2,

don't have iPad so I'm wondering is this happens to all iPads or just on this model, and hope there are some ways or tips to improve it.




[topic_controls]
[/topic_controls]