IwNUI performance and screen transitions

Home / Forums / Marmalade Archive / IwUI and IwNUI / IwNUI performance and screen transitions
10 replies [Last post]
by: Josiah
Status: Offline
Joined: 2012-04-09
Points: 2310

I am trying to make a very typical screen transition in an app where one screen slides off screen as another one slides on screen. I have seen this in many iOS apps. However when I try to do this in Marmalade the performance seems too slow to make it look smooth. I have to move the screens by large amounts to get the timing right because it seems to only run at about 5-10 fps. This is on a iPod and iPhone but all of the apps I download have this working very smoothly. Anyone have any ideas? I am using SetAttribute to move the screen and just some really basic code for testing in the IwNUIKitchenSink example:

while(!s3eDeviceCheckQuitRequest() && !(s3eKeyboardGetState(s3eKeyEsc) & S3E_KEY_STATE_DOWN) && !(s3eKeyboardGetState(s3eKeyAbsBSK) & S3E_KEY_STATE_DOWN))
{
app->Update();
//when the button is clicked to change a page pagemoving gets set to the screenwidth
if(pagemoving > 0)
{
pagemoving -= 100;
if(pagemoving {
pagemoving = 0;
views[lastpage]->SetAttribute("visible", 0);
}
views[page]->SetAttribute("x1",pagemoving);
views[lastpage]->SetAttribute("x1", pagemoving-screenWidth);
}

}

by: Josiah
Status: Offline
Joined: 2012-04-09
Points: 2310
After further testing I have

After further testing I have determined that it is the SetAttribute call that is causing the slow down. The frame rate is 40+ even while both screens are visible. As soon as views[page]->SetAttribute("x1",pagemoving) starts geting called the frame rate drops to 16-25. Even if the value of pagemoving is not changing (the page is not actually moving) the frame rate drops. It must just be the SetAttribute call that is slow. Anyone have any ideas? I get the feeling that not many people are using IwNUI yet?

by: Josiah
Status: Offline
Joined: 2012-04-09
Points: 2310
Maybe a better question is

Maybe a better question is has anyone made screen transition with IwNUI where one screen slides out of view while another slides into view?

by: Andrew Sternkern
Status: Offline
Joined: 2011-10-27
Points: 130
As I have experienced

As I have experienced SetAttribute is damn slow for such uses. I have created an application with ~8-9 pages and created a distinct function to set positioning and caption parameters, because of this my application boots up in about 10 seconds which is far from the acceptable range I think.

Let's hope it will get some rework or some alternate method will be defined as the current one is pretty limited.

by: Josiah
Status: Offline
Joined: 2012-04-09
Points: 2310
Yes this is very

Yes this is very disappointing as this is something very standard in apps and there appears to be no way of doing it with Marmalade. I have just tested on an iPad and the performance is even worse with the frame rate dropping to 7 while the screen is transitioning. I am surprised no one else has complained about this. What does everyone do for a screen transitions with Marmalade?

by: StatKsn
Status: Offline
Joined: 2011-02-02
Points: 1480
I gave up using IwNUI because

I gave up using IwNUI because of this problem. Any fix will be very appreciated.

by: TheBearF8
Status: Offline
Joined: 2012-05-11
Points: 1550
I am just trying to swap

I am just trying to swap Windows much like the UnitConverter example
with a second ShowWindow() call

It takes a while you can actually watch it load 4 - 7 elements one at a time and then slight pause
and the continue until all elements have been loaded

So for me the labels appear from top to bottom then the textfields and then the buttons and graphics

This is just with NUI with UI the screen appears as one piece

by: Josiah
Status: Offline
Joined: 2012-04-09
Points: 2310
It seems IwNUI still need

It seems IwNUI still need some work, can we get any comment from the Marmalade team?

by: Josiah
Status: Offline
Joined: 2012-04-09
Points: 2310
I have tested this same

I have tested this same situation using IwUI instead of IwHUI and there was no problem with the framerate dropping while the screens were moving. If you need to do anything like this I would recommend using IwUI if possible at least till this is fixed.

by: Lester-Madden
Status: Offline
Joined: 2012-05-08
Points: 3260
@Josiah I have logged this to

@Josiah I have logged this to be looked into [MAINT-783]
I can't give you an ETA but it has been raised for further investigation and to be fixed.

by: Josiah
Status: Offline
Joined: 2012-04-09
Points: 2310
Thank you! If I discover

Thank you! If I discover anything more I will post it.

Latest Posts

Latest Comments

Top Contributors

  • Chris D : 27,010
  • MonRoyals : 26,970
  • Salman : 26,720
  • Jez Hammond : 20,130
  • pjan : 11,150
  • gjw : 10,350
  • Paolo Oliverio : 9,640
  • Beaker_2 : 8,390
  • Kite : 8,210
  • bluescrn : 7,810