Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Performance degradation in the new public release
Started by pedro.perina Dec 11 2011 08:09 PM

- - - - -
66 replies to this topic
[TOPIC CONTROLS]
Page 1 of 3 1 2 3
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

pedro.perina

[GLOBAL: userInfoPane.html]
pedro.perina
  • Enthusiast

  • 31 posts
  • Corona SDK

Hi,

Has anyone noticed a performance degradation on Android in the last public release (704)?

I've been using the build 635 for weeks and the performance was good (50/60 fps), but today I switched to 704 and the game is unplayable (10/20 fps).

In the iOS world, oddly (or I should say expectedly), the performance has increased.

Has anyone had the same problem? Any tips on where to start looking at?

Thanks a lot!
uid: 96891 topic_id: 19009 reply_id: 319009


[TOPIC: post.html]
#2

PixelEnvision

[GLOBAL: userInfoPane.html]
PixelEnvision
  • Contributor

  • 305 posts
  • Corona SDK

Hi Pedro,

I think problem might be related to 32 bit color support:

http://blog.anscamobile.com/2011/11/more-android-daily-build-highlights/

I've seen more than few problem reports after that change (slower fps, alpha problems, etc) and in my opinion speed is more important than the 32 bit color support...

I must also add that change also broke app images on Android emulator. Before that change I was able to run my apps on emulator without any problems, but since the 32 bit color support images are going color distorted. Of course that's not the case on the actual devices but on emulator only.
uid: 10478 topic_id: 19009 reply_id: 73216


[TOPIC: post.html]
#3

pedro.perina

[GLOBAL: userInfoPane.html]
pedro.perina
  • Enthusiast

  • 31 posts
  • Corona SDK

Thanks PixelEnvision!

That may be the cause.
Any way to turn it off?
uid: 96891 topic_id: 19009 reply_id: 73217


[TOPIC: post.html]
#4

PixelEnvision

[GLOBAL: userInfoPane.html]
PixelEnvision
  • Contributor

  • 305 posts
  • Corona SDK

I guess not :(

There are few people asking for the same thing but threads were not concluded with a solution other than falling back to earlier daily build... Based on the threads build 641 is the latest build without that problem.

http://developer.anscamobile.com/sites/default/files/corona/2011.641/CoronaSDK-2011.641.dmg

https://developer.anscamobile.com/forum/2011/11/18/build-656-not-good-my-android-build
http://developer.anscamobile.com/forum/2011/11/06/fps-drops-build-656

Maybe you should open a bug report to get that fixed.
uid: 10478 topic_id: 19009 reply_id: 73218


[TOPIC: post.html]
#5

producerism

[GLOBAL: userInfoPane.html]
producerism
  • Contributor

  • 249 posts
  • Corona SDK

the 32 bit color support wasn't as much of a "feature" as it was a bug-fix. iOS was already showing 32bit, but for some reason in the Android API, it defaulted to 16bit textures for openGL. This actually resulted in a few nasty issues with color and also transparency.
uid: 49447 topic_id: 19009 reply_id: 73228


[TOPIC: post.html]
#6

pedro.perina

[GLOBAL: userInfoPane.html]
pedro.perina
  • Enthusiast

  • 31 posts
  • Corona SDK

Thanks again PixelEnvision.

I have a serious problem now. I'm really interested in some of the new features and bug fixes added in the latest release but my app has been dramatically hit by this 32 bit color support.

@Ansca
Should I file a new bug report for that? Actually it is not a bug, but a feature (one I would certainly drop in favor of a better frame rate).
uid: 96891 topic_id: 19009 reply_id: 73229


[TOPIC: post.html]
#7

pedro.perina

[GLOBAL: userInfoPane.html]
pedro.perina
  • Enthusiast

  • 31 posts
  • Corona SDK

One more update.

My test device is a Motorola Xoom (Android 3.1). The performance went from 50/60 to 20/25. I've just tested the game on a Sony Ericsson Arc (Android 2.3) and the performance has increased.

Any tips?
uid: 96891 topic_id: 19009 reply_id: 73234


[TOPIC: post.html]
#8

PixelEnvision

[GLOBAL: userInfoPane.html]
PixelEnvision
  • Contributor

  • 305 posts
  • Corona SDK

I found a recent test which shows the same thing...32 bit generally appears to be slowing down fps on Android... Take a look at DrawTest section...

http://markdingst.blogspot.com/2011/04/android-graphics-benchmark.html

Just an idea but maybe it might be possible to make that optional by using config.lua? So, we can choose between image quality vs fps depending on the type of app we're working on...
uid: 10478 topic_id: 19009 reply_id: 73313


[TOPIC: post.html]
#9

pedro.perina

[GLOBAL: userInfoPane.html]
pedro.perina
  • Enthusiast

  • 31 posts
  • Corona SDK

Thanks for the link.

I'm trying to squeeze the performance here, but not matter what I do, I will never be able to match what I lost with the 32 bit color support. An option in the manifest would be perfect. Otherwise we will drop Xoom from our targets list (along with any other device that can't handle 32 bit images).

@Ansca
Could you please comment on that?
uid: 96891 topic_id: 19009 reply_id: 73315


[TOPIC: post.html]
#10

PixelEnvision

[GLOBAL: userInfoPane.html]
PixelEnvision
  • Contributor

  • 305 posts
  • Corona SDK

@perdo, you're welcome...

So, that change only slows down fps on older (16 bit) devices and newer devices with 32 bit support becomes faster?
uid: 10478 topic_id: 19009 reply_id: 73569


[TOPIC: post.html]
#11

pedro.perina

[GLOBAL: userInfoPane.html]
pedro.perina
  • Enthusiast

  • 31 posts
  • Corona SDK

Hi PixelEnvision

In my tests, things got faster on Nexus S, SE Arc and iOS (3GS, 4). But got slower on Android tablets (Xoom and Galaxy Tab).
uid: 96891 topic_id: 19009 reply_id: 73724


[TOPIC: post.html]
#12

pedro.perina

[GLOBAL: userInfoPane.html]
pedro.perina
  • Enthusiast

  • 31 posts
  • Corona SDK

Update

After striping the game down, the conclusion is that background images are the problem and this leads to the 32 bit color support. I removed everything, every element in my game, but only when I removed the bg images the performance increased. I'm using 256x256 tiles that are repeated to fill the entire screen. When they are present, the performance is terrible. When they are not, Xoom looks like an Ipad.

So, I have a few options left, like changing my bg, but the game would loose a lot with a blank background. I even tried to fill the background with a green rect (display.newRect) and, to my surprise, the performance goes down, by a lot.

It's strange how a rectangle can affect performance like this.
uid: 96891 topic_id: 19009 reply_id: 73814


[TOPIC: post.html]
#13

vishwas.zambre

[GLOBAL: userInfoPane.html]
vishwas.zambre
  • Observer

  • 5 posts
  • Corona SDK

I want to develop application for enterprise level,for instance,a software for hotel in which a customer will navigated through tab(application software) for accessing the facilities available which i'm developing with the help of android which i find flexible for development but this same scenario i want to repeat for iphone i find corona SDK for cross platform development which uses Lua Scripting but its syntax is basically for game(as i saw)and i thing it will lead me to complexity in future while development so which one will be suitable language (which i can use)?
uid: 108555 topic_id: 19009 reply_id: 73904


[TOPIC: post.html]
#14

Sven.Lua

[GLOBAL: userInfoPane.html]
Sven.Lua
  • Contributor

  • 145 posts
  • Corona SDK

Sounds as the performance change depends on the OpenGL hardware and/or implementation on the specific device. I would prefer to have this 32-feature configurable as far as I don't need the perfect gradients. I can use dithering for my needs...

Best option - configurable in the app on runtime
uid: 70114 topic_id: 19009 reply_id: 73961


[TOPIC: post.html]
#15

pedro.perina

[GLOBAL: userInfoPane.html]
pedro.perina
  • Enthusiast

  • 31 posts
  • Corona SDK

Hi Sven,

I (and others here) agree with you. An option in the manifest would do.

@Ansca
Could you please step in?
uid: 96891 topic_id: 19009 reply_id: 73977


[TOPIC: post.html]
#16

pedro.perina

[GLOBAL: userInfoPane.html]
pedro.perina
  • Enthusiast

  • 31 posts
  • Corona SDK

Can Ansca, by any chance, comment on that?
uid: 96891 topic_id: 19009 reply_id: 74706


[TOPIC: post.html]
#17

pedro.perina

[GLOBAL: userInfoPane.html]
pedro.perina
  • Enthusiast

  • 31 posts
  • Corona SDK

I still have faith that someone from Ansca will say something here. Who should a pray for?
uid: 96891 topic_id: 19009 reply_id: 75087


[TOPIC: post.html]
#18

Chang Kian Boon

[GLOBAL: userInfoPane.html]
Chang Kian Boon
  • Enthusiast

  • 44 posts
  • Corona SDK

+1 for 32 bit configurable to 16 bit.

I also have this performance hit with simple but large background image. No point to display 32 bit for simple background image that looks as good as with 8 and 16 bit display. Until then it is hard to develop a game with large scale display. =(
uid: 12979 topic_id: 19009 reply_id: 76248


[TOPIC: post.html]
#19

NuclearResearch.net

[GLOBAL: userInfoPane.html]
NuclearResearch.net
  • Enthusiast

  • 67 posts
  • Corona SDK

Just adding to the pot that I've got a 20% to 30% increase in memory usage from the same build of the same game when passing from Corona 689 to Corona 704 (and others more recent).
uid: 67641 topic_id: 19009 reply_id: 76250


[TOPIC: post.html]
#20

@RSCdev

[GLOBAL: userInfoPane.html]
@RSCdev
  • Corona Geek

  • 1,489 posts
  • Corona SDK

@RAoM_games are you speaking about the size of the built`s app in Mb or internal memmory required by the app?
Cheers,
Rodrigo.
uid: 89165 topic_id: 19009 reply_id: 76258


[TOPIC: post.html]
#21

NuclearResearch.net

[GLOBAL: userInfoPane.html]
NuclearResearch.net
  • Enthusiast

  • 67 posts
  • Corona SDK

Hi Rodrigo, while playing my game in full for 3-4 times in a row (it uses storyboard and is made of 22 scenes), internal memory usage (texture memory usage was not important) was stable at 1.2 MB with 689 and jumped to 1.6 MB with 704. I will try the latest Corona SDK release as soon as possible. Hope it helps.
uid: 67641 topic_id: 19009 reply_id: 76261


[TOPIC: post.html]
#22

@RSCdev

[GLOBAL: userInfoPane.html]
@RSCdev
  • Corona Geek

  • 1,489 posts
  • Corona SDK

Hi @RAoM_games, I got it. Thank you for the reply. BTW report here what you find when using the latest Corona`s daily-build as well.

Cheers,
Rodrigo.
uid: 89165 topic_id: 19009 reply_id: 76264


[TOPIC: post.html]
#23

pedro.perina

[GLOBAL: userInfoPane.html]
pedro.perina
  • Enthusiast

  • 31 posts
  • Corona SDK

Hi Ansca,

Due to the problem discussed in this thread, we decided to drop Xoom from our supported devices list. It's not that bad because the Xoom market share is very small. But, today, unfortunately, we tested the game in a Samsung Galaxy S2 and we got the exact same problem. When we use build 635, the game runs very fast. But it gets unplayable with 704. In this case, dropping Galaxy 2 from our target list is not an option. We would lose one of the best Android phones in the market and its huge market penetration (especially in South Korea).

So, we come again to the same question. Is it possible to have a flag in the manifest where we can switch off the 32 bits image support?

PS: we also tested the game in the Kindle Fire and it runs fine
uid: 96891 topic_id: 19009 reply_id: 81867


[TOPIC: post.html]
#24

pedro.perina

[GLOBAL: userInfoPane.html]
pedro.perina
  • Enthusiast

  • 31 posts
  • Corona SDK

Please help.
uid: 96891 topic_id: 19009 reply_id: 82461


[TOPIC: post.html]
#25

dingo

[GLOBAL: userInfoPane.html]
dingo
  • Contributor

  • 700 posts
  • Corona SDK

@pedro: i've just tested my game on the samsung galaxy s2; it worked fine on ipad, iphone etc... but on android very slow. and the performance of the s2 should actually be roughly the same as an iphone4?

+1
uid: 90610 topic_id: 19009 reply_id: 82463



[topic_controls]
Page 1 of 3 1 2 3
 
[/topic_controls]