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);
}
}












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?
Maybe a better question is has anyone made screen transition with IwNUI where one screen slides out of view while another slides into view?
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.
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?
I gave up using IwNUI because of this problem. Any fix will be very appreciated.
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
It seems IwNUI still need some work, can we get any comment from the Marmalade team?
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.
@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.
Thank you! If I discover anything more I will post it.