General performance vs graphics 1.0

Have you done anything other than just the necessary migration changes (anchors, colors etc)?

As I say, we tried it with build 2099 (which was 2 builds ago), and it was noticeably slower than G1 without using any filters/snapshots etc.

Well I’m using G2-only features, so there’s no migration possible as such. I was merely commenting on how G2 seems to have sped up slightly recently, but your point is valid. I should look into updating one of my more graphics-intensive games and see how it fairs.

Time permitting, I’ll give it a stab this week and report back.

Hi, we find that the G2 switch has made our games significantly slower on all (ios) devices except the latest A7 processors. A game that was really smooth on an A5 (iphone 4s) before G2, is now totally unusable on that device. A6 works fine, just a little lag here and there. A4… well. Just forget it. Used to work fine with G1, not anymore.

@haakon  Do you have a test case or additional information you can supply?  We’ve tested a few large apps that show substantially better performance on several devices.  Are you using any third party libraries?

Hi Hachisoft, thanks for the tip I will try this!

I just want to confirm that the performance of Storyboard is definitely slower in Graphics 2.0.

I just turned my project back to build 2013.1260 and Storyboard is smooth again.

In Graphics 2.0 when I do a fade or side to side transition, it seems to try to load the screen and do the transition at the same time, which causes jerkiness if the screen has a lot of graphics.

In Graphics 1.0 storyboard seems to wait for a moment, load the screen in the background, and then smoothly slides/fades to the next screen.

Can somebody in the Corona team check this?

Thanks!

Jorge

PS: I tested this in iPad1, iPad2, and iPhone 5. All 3 run storyboard smoother on build 1260, but not later.

This thread might be worth reading:

http://forums.coronalabs.com/topic/41407-resolved-graphics-20-bad-performance-image-loading/page-2

@Pers  Can you send me a sample project?  Also which build of G2.0 were you using?

@Rob Thank you. Yes, did I check that thread and I have made changes to my code to improve performance. But Storyboard is still slow for me.

@Bryan01 I think I’ve tried most post G2.0 builds. But recently I’ve used these builds: 2140, 2130, 2126, 2122.

My code is quite large and it will take me a while to strip elements and create a simple build, but if I get the chance I will do it.

One thing that I am currently doing (that may be wrong) is that most of my code is in the “createScene” function, and perhaps I should move it to “enterScene” function. 

I also use a loooot of sound effects and voices, and my understanding is that audio increases loading time. 

But this was working fine in the G.1.0 builds.

Jorge

Hi guys, has the G2 performance issue with certain devices like iPhone4 been resolved? I would like to start my next Corona based project and would like to know if I have to stick with G1 again…

I am also having a lot of performance issues with Graphics 2.0.

I am using the latest build (2014.2122), and I am not using any 2.0 effects.

First of all, Storyboard is not as smooth when going from one screen to another left/right up/down. Instead of transitioning smoothly as it did with Graphics 1.0, it stutters or jumps straight to the next screen (happens on iPad1, iPad 2, iPhone 4, iPhone5).

But the main problem seem to be with the loading of images. Everything is a bit slower in iPad 1 and iPhone 4, but NOT on iPad 2 and iPhone 5 (except for Storyboard).

This is most noticeable when I use Fruit-Ninja-like code that creates a line when you touch the screen to “slice” an object:

     line=display.newImage(“images/line-effect.png”)

     line.x=v.x line.y=v.y

     line.alpha=.15;line.xScale=1.5;line.yScale=1.5;  line.blendMode=“add”

     line.rotation=math.random(0, 360)

     transition.to(line, {time = lineFadeTime, alpha = 0, xScale = 0.1, yScale = 0.1, onComplete = function(event) if line then if line.removeSelf then line:removeSelf(); line = nil;  end; end; end})        

This code basically stops my entire game if “slice” left to right with my finger quickly, several times.

Even if I comment the 3rd, 4th, 5th lines of this code, I still get the slow performance, so it is not an issue with alpha or transitions. I also tested loading JPGs with no alpha, and I still got the same issue. If I change the code to draw a circle or line instead of loading an image, then the performance is fine.

This did not happen in Graphics 1.0 (I have builds with each version installed side by side on the devices).

I am assuming the same issue is making Storyboard slower (loading a lot of images quickly, before switching to another screen). Once the screen loads, going back to the previous screen is smooth.

I hope you are aware of these issues and you are working on a fix or can suggest a workaround.

Thank you,

Jorge

FYI: Using the old Sprite Library DOES slow down performance and this is not the cause of the problem either, since I transitioned all my animations to the new Sprite engine.

Yikes, I was planning to move over to G2.0 tomorrow for a new project, but as this game only has a three week lead time I’ll stick with G1.0 as it sounds like it’s the better option at the moment.

I’m not sure if the loading time of a new texture has increased from G1.0 to G2.0, but in general (for both of them), loading textures after the scene has loaded is bound to stop the runtime while it waits for it to load. Small images load faster, while big images takes much longer, but even for small images, it’s preferable to load the texture at the start of the scene (even if you don’t use sheets, just precreate some objects with newImageRect, put them invisible and leave them be, the texture will stay loaded in memory and won’t be loaded again for other similar objects).

If you’re only loading texture at the start of the scene, apart from the initial loading time you shouldn’t see any particular slowdown during the actual game. And if it takes too much, maybe you’re using too many big images, which could use a bit of optimization.

Following these “rules”, I haven’t seen any difference in performances porting projects from 1.0 to 2.0.

Hi Hachisoft, thanks for the tip I will try this!

I just want to confirm that the performance of Storyboard is definitely slower in Graphics 2.0.

I just turned my project back to build 2013.1260 and Storyboard is smooth again.

In Graphics 2.0 when I do a fade or side to side transition, it seems to try to load the screen and do the transition at the same time, which causes jerkiness if the screen has a lot of graphics.

In Graphics 1.0 storyboard seems to wait for a moment, load the screen in the background, and then smoothly slides/fades to the next screen.

Can somebody in the Corona team check this?

Thanks!

Jorge

PS: I tested this in iPad1, iPad2, and iPhone 5. All 3 run storyboard smoother on build 1260, but not later.

This thread might be worth reading:

http://forums.coronalabs.com/topic/41407-resolved-graphics-20-bad-performance-image-loading/page-2

@Pers  Can you send me a sample project?  Also which build of G2.0 were you using?

@Rob Thank you. Yes, did I check that thread and I have made changes to my code to improve performance. But Storyboard is still slow for me.

@Bryan01 I think I’ve tried most post G2.0 builds. But recently I’ve used these builds: 2140, 2130, 2126, 2122.

My code is quite large and it will take me a while to strip elements and create a simple build, but if I get the chance I will do it.

One thing that I am currently doing (that may be wrong) is that most of my code is in the “createScene” function, and perhaps I should move it to “enterScene” function. 

I also use a loooot of sound effects and voices, and my understanding is that audio increases loading time. 

But this was working fine in the G.1.0 builds.

Jorge

Hi guys, has the G2 performance issue with certain devices like iPhone4 been resolved? I would like to start my next Corona based project and would like to know if I have to stick with G1 again…