Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

General performance vs graphics 1.0
Started by AlanPlantPot Dec 06 2013 09:31 AM

18 replies to this topic
graphics 2.0 1.0 performance framerate
[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

AlanPlantPot

[GLOBAL: userInfoPane.html]
AlanPlantPot
  • Contributor

  • 733 posts
  • Corona SDK

I'm curious as to how people are finding the performance of their existing apps after converting to graphics 2.0.  

 

There are lots of great new features for us to use, such as the filters, snapshots etc, but has anyone noticed any improvements in the speed of their apps before implementing the new features (i.e. everything else is equal between your v1 and v2 app)?

 

I'm a bit concerned that the few apps I've changed have been either the same speed or slower, but I'm more than willing to admit that this could be down to me mismanaging the migration somehow. Certainly the memory usage goes down significantly, in one of my apps the texture memory goes down from 85mb to 58mb :), but at the same time the FPS goes from 45fps to 20fps :(.

 

Does anyone have any tips on improving the performance? Is there something that made a big difference for you that could easily be overlooked?



[TOPIC: post.html]
#2

SegaBoy

[GLOBAL: userInfoPane.html]
SegaBoy
  • Contributor

  • 635 posts
  • Corona SDK

I need to check - but it seems that MTE has suffered a downgrade, I don't believe I'm the first person to observe this. I haven't performed any proper benchmark tests yet, so I'm going to boot up v1.0 and see.



[TOPIC: post.html]
#3

bjsorrentino

[GLOBAL: userInfoPane.html]
bjsorrentino
  • Veteran

  • 8,506 posts
  • Corona SDK

Hi guys,

This is a fairly general topic, so I'm not sure what may be causing issues. One potential thing is if you're using one of 4 or 5 complex filter effects, including "blurGaussian". Rendering objects with those filters just once, in place, should not be an issue, but those objects are also re-rendered on every frame that they change. This includes moving those objects, via physics, transition, or enterFrame… in those cases, the GPU needs to re-render the filter on every frame refresh, and thus for complex filters like blurGaussian, the performance can suffer (and especially if you increase the parameters of those filters to more extreme levels).

 

Brent



[TOPIC: post.html]
#4

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,263 posts
  • Enterprise

Also there seemed to be some issues with anti-aliasing that impacted performance (which should be addressed in a later daily build) and something about pre-loading vs. lazy loading of images but if I'm being honest, I don't quite understand those issues yet).

 

Rob



[TOPIC: post.html]
#5

Bryan01

[GLOBAL: userInfoPane.html]
Bryan01
  • Enthusiast

  • 95 posts
  • Corona Staff

@Alan

 

Have you tried the latest daily build? We made several changes to how images load, changed antialiasing, as well as bug fixes.  Have you noted any performance changes on devices other than gamestick?



[TOPIC: post.html]
#6

AlanPlantPot

[GLOBAL: userInfoPane.html]
AlanPlantPot
  • Contributor

  • 733 posts
  • Corona SDK

@Brent - As I mentioned in my first post, my apps seem to be slower before implementing any new features. No filters, no containers, just converting ref points to anchor points and changing 0-255 colours to 0-1 (and using "preloadTextures").

 

@Rob Miracle -This is good to know. I wondered if there were any known issues (like the AA one) which could be affecting performance. I don't think the preloading v lazy loading should affect gameplay once the scene is loaded though, my understanding is it only affects the initial loading of the images.

 

@Bryan01 - Yes we last tried it with build 2099, and that was the build I used where our FPS went down to ~20fps



[TOPIC: post.html]
#7

rakoonic2

[GLOBAL: userInfoPane.html]
rakoonic2
  • Contributor

  • 503 posts
  • Corona SDK

I should point out that within G2 builds, I've noticed a slight speed up of late, although I can't pin it down to a particular version number as I haven't been paying attention. All I know is I can run one of my games with more onscreen without framerate hits than in the past, so that's a good sign at least.



[TOPIC: post.html]
#8

AlanPlantPot

[GLOBAL: userInfoPane.html]
AlanPlantPot
  • Contributor

  • 733 posts
  • Corona SDK

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.



[TOPIC: post.html]
#9

rakoonic2

[GLOBAL: userInfoPane.html]
rakoonic2
  • Contributor

  • 503 posts
  • Corona SDK

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.



[TOPIC: post.html]
#10

haakon

[GLOBAL: userInfoPane.html]
haakon
  • Contributor

  • 188 posts
  • Enterprise

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.



[TOPIC: post.html]
#11

Bryan01

[GLOBAL: userInfoPane.html]
Bryan01
  • Enthusiast

  • 95 posts
  • Corona Staff

@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?



[TOPIC: post.html]
#12

Pers

[GLOBAL: userInfoPane.html]
Pers
  • Enthusiast

  • 86 posts
  • Corona SDK

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.



[TOPIC: post.html]
#13

AndyCWatson

[GLOBAL: userInfoPane.html]
AndyCWatson
  • Enthusiast

  • 46 posts
  • Corona SDK

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.



[TOPIC: post.html]
#14

RagdogStudios

[GLOBAL: userInfoPane.html]
RagdogStudios
  • Contributor

  • 144 posts
  • Corona SDK

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.



[TOPIC: post.html]
#15

Pers

[GLOBAL: userInfoPane.html]
Pers
  • Enthusiast

  • 86 posts
  • Corona SDK

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.



[TOPIC: post.html]
#16

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,263 posts
  • Enterprise

[TOPIC: post.html]
#17

Bryan01

[GLOBAL: userInfoPane.html]
Bryan01
  • Enthusiast

  • 95 posts
  • Corona Staff

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



[TOPIC: post.html]
#18

Pers

[GLOBAL: userInfoPane.html]
Pers
  • Enthusiast

  • 86 posts
  • Corona SDK

@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



[TOPIC: post.html]
#19

CineTek

[GLOBAL: userInfoPane.html]
CineTek
  • Contributor

  • 310 posts
  • Corona SDK

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...




[topic_controls]
[/topic_controls]