Frame Rate when build for xcode sim or device

@richard770:

I think you’re doing the right thing. Shure it’s always nice to play around with a new tool. But as long as you can save some money… and are still able to work with the free edition … while graphics 2.0 needs time to be a bit more mature - why spending it?

OK. I’ve done some research about the iPhone 4 / 3GS issue, and the behavior we see (3GS being faster) is natural.

Both devices use the same CPU/GPU!

iPhone 4:

CPU: Single-Core ARM Cortex-A8
GPU: PowerVR SGX535
Clock Speed: 800 MHz

iPhone 3GS:

CPU: Single-Core ARM Cortex-A8
GPU: PowerVR SGX535
Clock Speed: 600 MHz

Although the CPU on the iPhone 4 is running at a higher clock speed, the poor little GPU has to deal with 4x the pixels with its Retina Display. So it’s quite natural that all 4th generation devices’ graphics performance will suffer. Especially when we start using a lot of fancy GPU intensive G2.0 filters.

A horizonal/vertical blurSize of 40 is a bit taxing for the GPU, as every pixel will have to be blurred 40x40 pixels which is a lot of processing.

I reduced both to 8 in my sample project with pretty much the same visual effect, and it performs at 60fps on an iPhone 3GS and iPad mini. iPhone 4 suffers, but that’s due to the fact that it uses the same GPU as the 3GS (as I wrote in a post above).

@ingemar Is it still the case that apps built with G2 suffer performance issues on 4th gen divices, but not if built with G1.0 builds?m
If so, I dont see why its the GPU thats the problem?
Cheers

@richard

I created my own sample project that was similar to CineTek’s and as of build 2016, those frame-rate issues are gone.

You might also recall that I was experiencing similar problems with a production app that I had converted to Graphics 2 (no compatibility mode). That app also runs fine on iPhone 4 now.

For these apps, there’s no speed / frame-rate difference between Corona G1 and G2 on the iPhone 4.

The issue that @roman has posted is a bit different as it relies on the power of the GPU to create the effects (and can’t be run using G1). I was unaware that the iPhone 4 had the same GPU as the iPhone 3GS. Basically it’s just an iPhone 3GS with a Retina Display. It’s only the iPhone 4S that got a bump in GPU.

I found many topics around the web where the iPhone 4 was criticized for having a severly underpowered GPU considering it has 4x the number of pixels to drive.

I guess that there are *some* issues that the guys at Corona Labs will be able to tweak in G2, but since we’re talking about using the GPU in ways that wasn’t possible before in G1, we’re going to start to see device limitations now, which unfortunately Corona Labs can’t do anything about.

Having said that, there should be *no* speed differences between G1 and G2. So if an app runs fine in G1, and doesn’t in G2… it should be reported.

@ingemar Thats good to hear.
Maybe its an idea to load low res assets on iphone 4 and not @2x if your specific app is suffering as a result of GPU limitations

The test project I have has no graphic assets at all… there are only newCircle, newLine and newText objects with solid fills.

After finding out that the iPhone 4 has a weak GPU (actually all 4th gen. devices), I’m personally not going to use it to benchmark my apps anymore.

I’ll be doing my testing on the 3GS instead. If it runs poorly on the iPhone 4, I’ll just see if there’s something evidently wrong with my code, but I’m not willing to put too much effort into, or strip functionality, trying to accommodate weak hardware.

If it runs well on a 3GS and all other devices, I think I’m going to be fine with it  ;).

PS.

To avoid bad reviews, we *could* check for a 4th gen. device when starting the app and have conditional statements within our code to skip G2 effects that are known to cause problems… but the question is: Is it worth the extra effort/code to fiddle around with this?

@ingemar:

thanks for the overall information.

I also didn’t know exactly how blurSize works.

I changed it the way you suggested and it works much better now.

Actually there are a number of differences between the 3GS and the iPhone 4 The processor speed is higher in the iPhone 4 (800 as opposed to 600mhz) as well as the gpu is a faster version in the iPhone 4 (200 MHz as opposed to 150 MHz) the iPhone 4 also has twice as much ram.

Update: Built Raycast sample app for device set to fps=60, and its pretty poor. Its fine in the Corona Sim

I’ve tested one of my physics-based apps with sprite animations @60fps.

It’s also using Particle Candy and Text Candy, and I see no noticeable frame-rate drop with Graphics 2.0 build 2004 when running on a device.

By the way…  

(this goes for Graphics 1.0 and 2.0 builds)

For me, Xcode Simulator builds have serious frame rate problems, and I haven’t used them for a loooong time. The frame-rate drops get progressively worse as the size of the virtual device increases. iPad Retina for example is completely unusable.

I was told by a Corona Labs alumni that it was due to an issue with Apple. I filed a bug report with Apple (radar 11089495,  21 March 2012), but it got closed by them stating “Insufficient Information”, as I couldn’t provide them with enough detailed info about the issue.

Thanks for the info Ingemar… Do you mind telling me what ver of xcode you’re running? 5? Was there any settings you had to change when you upgraded to 5?

I am seeing a serious frame rate drop on my device… but only when I build with graphics 2.0 build. 

Are you telling me you can set the frame rate to 60 for the raycasting sample app… and build for Xcode or device and see no major drop? 

PS. I have used the xcode sim for testing before… it does suffer from some framerate drop… but nothing like this… and it never translated to my device.

I’m using Xcode Version 5.0 (5A1413) on OSX 10.8.5.

No special settings were done. Keep in mind that Xcode 5 will overwrite your Xcode 4 installation.

I haven’t tried the Raycasting sample though. Once I do that I’ll get back to you here…

Graphics 2.0 build 2004

I’ve got no frame-rate problems when running the Raycasting sample on an iPod Touch 3G (iOS 5.1.1), iPod Touch 5G (iOS 7) or iPad mini (iOS 7). (I changed the fps to 60 in config.lua)

Thanks ingemar… appreciate the info and testing… I’ve got a local issue it seems!

I am running 2003… so will update to 2004 and try it… cause Im not talking about a reduced framerate… Im literally talking a stuttering 5-10 fps… :confused:

I’ll let ya know how it goes…

Thanks

ok, built the raycast sample for my iphone4/IOS7 with build 2004… at 60fps… works fine.

But my own app is still not.

Heres what I got.

An app that works fine in mac and win simulators on all builds of Corona…ie. public Graphics 1.0 1202… daily 1233… and graphics 2.0 build 2004.

If I build using graphics 1.0 builds, its fine.

If I turn on graphics compatibility 1 mode… and build with G2.0 build 2004… the framerate is about 5 on my iphone 4 IOS 7… and the app is unusable.

Anyone suggest ways to debug such a problem? I have the texturememoryused printing to the display but thats not working at the moment… so cant see if I have a memory issue in device builds with G2.0 2004.

Im stumped…

Cheers

Just a thought…

I’m just wondering if V1 compatibility mode may be logging a bunch of warnings in the device log, that maybe is slowing things down?

(Like the old days of BASIC where too many REMs would cause an application to come to a crawl  :slight_smile: )

The physics app of mine that I referred to above is fully converted to Graphics 2.0 (no V1 compatibility mode)