Announcements
The Scaleform forum is now read-only. Please head to the Gamedev site for product support.
Scaleform Forum (Read Only)
Scaleform enables developers to leverage the power of the Adobe® Flash® tool set to create powerful user interface environments for video games.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Slow performance on iOS

10 REPLIES 10
Reply
Message 1 of 11
Anonymous
1250 Views, 10 Replies

Slow performance on iOS

Anonymous
Not applicable

We are using the latest version of Scaleform Mobile SDK (4.4.29) for iOS and are noticing that it is running a lot slower than the previous version (4.2.24). Our Deployment Target is 7.0, which means that Metal is not being used. I don't think there is an issue with the display loop, other than not being able to see the FPS in Xcode. It seems that the ActionScript code itself is executing much slower. I am testing this out on an iPad 4 and iPad Air that are both running iOS 8.3. I have tried disabling/enabling most of the settings in GFxConfig.h but have had no luck. Does anyone have any thoughts on what may be causing this slowdown? 

 

I did notice that if I set my architecture to armv7 only, it would sometimes run fine. This was happening on the iPad 4 which doesn't even support arm64, so I don't see why this change would matter.

Reply
Reply
0 Likes

Slow performance on iOS

We are using the latest version of Scaleform Mobile SDK (4.4.29) for iOS and are noticing that it is running a lot slower than the previous version (4.2.24). Our Deployment Target is 7.0, which means that Metal is not being used. I don't think there is an issue with the display loop, other than not being able to see the FPS in Xcode. It seems that the ActionScript code itself is executing much slower. I am testing this out on an iPad 4 and iPad Air that are both running iOS 8.3. I have tried disabling/enabling most of the settings in GFxConfig.h but have had no luck. Does anyone have any thoughts on what may be causing this slowdown? 

 

I did notice that if I set my architecture to armv7 only, it would sometimes run fine. This was happening on the iPad 4 which doesn't even support arm64, so I don't see why this change would matter.

10 REPLIES 10
Message 2 of 11
Anonymous
in reply to: Anonymous

Anonymous
Not applicable

we're having the same issue... we thought it was us at first as we were using some graphical intensive content

as of yet we can't find a solution, so are putting on hold several projects

Reply
Reply
0 Likes

we're having the same issue... we thought it was us at first as we were using some graphical intensive content

as of yet we can't find a solution, so are putting on hold several projects

Message 3 of 11
Anonymous
in reply to: Anonymous

Anonymous
Not applicable

Here is the AMP output for the exact same scene in Release mode with the previous and current version of Scaleform.Before.png

 

After.png

Reply
Reply
0 Likes

Here is the AMP output for the exact same scene in Release mode with the previous and current version of Scaleform.Before.png

 

After.png

Message 4 of 11
Anonymous
in reply to: Anonymous

Anonymous
Not applicable
// GFxConfig.h
#define SF_AS3_MAX_PERFORMANCE

#ifdef SF_AS3_MAX_PERFORMANCE
    #ifndef SF_AS3_OBJ_CLONING
        #define SF_AS3_OBJ_CLONING
    #endif
    #ifdef SF_AS3_OBJ_CLONING_COUNTER
        #undef SF_AS3_OBJ_CLONING_COUNTER
    #endif
    #ifndef SF_AS3_OBJ_POOLING
        #define SF_AS3_OBJ_POOLING
    #endif
    #ifdef SF_AS3_OBJ_POOLING_CLEAN_IN_GC
        #undef SF_AS3_OBJ_POOLING_CLEAN_IN_GC
    #endif
#endif

These defines do not seem to be used in any of the provided source code, but I assume they are used within libgfx_as3.a. From my understanding, this means that modifying them in this header has no effect as it only matters at compile-time of the library. Would it be possible to get a build of Scaleform with these defines disabled as it seems that it is the AS VM itself that is running slowly.

Reply
Reply
0 Likes

// GFxConfig.h
#define SF_AS3_MAX_PERFORMANCE

#ifdef SF_AS3_MAX_PERFORMANCE
    #ifndef SF_AS3_OBJ_CLONING
        #define SF_AS3_OBJ_CLONING
    #endif
    #ifdef SF_AS3_OBJ_CLONING_COUNTER
        #undef SF_AS3_OBJ_CLONING_COUNTER
    #endif
    #ifndef SF_AS3_OBJ_POOLING
        #define SF_AS3_OBJ_POOLING
    #endif
    #ifdef SF_AS3_OBJ_POOLING_CLEAN_IN_GC
        #undef SF_AS3_OBJ_POOLING_CLEAN_IN_GC
    #endif
#endif

These defines do not seem to be used in any of the provided source code, but I assume they are used within libgfx_as3.a. From my understanding, this means that modifying them in this header has no effect as it only matters at compile-time of the library. Would it be possible to get a build of Scaleform with these defines disabled as it seems that it is the AS VM itself that is running slowly.

Message 5 of 11
SFjenkink
in reply to: Anonymous

SFjenkink
Alumni
Alumni
Hi Frank would it be possible for you to send us your content so we can repro/diagnose the issue on our end? Sorry for the delayed response we've been going through a bit of a transition period
Reply
Reply
0 Likes

Hi Frank would it be possible for you to send us your content so we can repro/diagnose the issue on our end? Sorry for the delayed response we've been going through a bit of a transition period
Message 6 of 11
Anonymous
in reply to: SFjenkink

Anonymous
Not applicable

Just checking in to see if you received my demo project in your messages. Is there any other info that you need from us to debug this further?

Reply
Reply
0 Likes

Just checking in to see if you received my demo project in your messages. Is there any other info that you need from us to debug this further?

Message 7 of 11
SFjenkink
in reply to: Anonymous

SFjenkink
Alumni
Alumni

HI Frank i heard back from our rendering engineer it looks like the slow down is coming from the use of Advanced blend modes since the majority of the time is spent KI_BlendMode :: DrawBundleEntry.

 

These blend modes, like filters, use the render target caching system, meaning that if the content doesn’t change between frames the expensive portion of the pipeline is skipped. This would explain the increase in framerate after the initial drop. These blend modes were implemented in GFx 4.3, so they would have not been in the previous mobile SDK release. In GFx 4.2 (and below), they just did ‘Normal’ blending, which is very fast. Many times, customers have these modes used in their content, but don’t realize it. The visual impact is very small, while the performance impact is very large. This is especially true on mobiles, whose blending units are generally slow. I would suggest going thorugh the content and look for these blend modes (LAYER, ALPHA, ERASE, OVERLAY, HARDLIGHT, DIFFERENCE, DARKEN and LIGHTEN), and remove/rework them if they aren’t needed

Reply
Reply
0 Likes

HI Frank i heard back from our rendering engineer it looks like the slow down is coming from the use of Advanced blend modes since the majority of the time is spent KI_BlendMode :: DrawBundleEntry.

 

These blend modes, like filters, use the render target caching system, meaning that if the content doesn’t change between frames the expensive portion of the pipeline is skipped. This would explain the increase in framerate after the initial drop. These blend modes were implemented in GFx 4.3, so they would have not been in the previous mobile SDK release. In GFx 4.2 (and below), they just did ‘Normal’ blending, which is very fast. Many times, customers have these modes used in their content, but don’t realize it. The visual impact is very small, while the performance impact is very large. This is especially true on mobiles, whose blending units are generally slow. I would suggest going thorugh the content and look for these blend modes (LAYER, ALPHA, ERASE, OVERLAY, HARDLIGHT, DIFFERENCE, DARKEN and LIGHTEN), and remove/rework them if they aren’t needed

Message 8 of 11
Anonymous
in reply to: SFjenkink

Anonymous
Not applicable

I took a look at everything in the demo project that I sent you and it looks like all blend modes are set to Normal. Additionally, the project is experiencing a generic slowdown and it sounds like this caching issue would only affect initialization.

Reply
Reply
0 Likes

I took a look at everything in the demo project that I sent you and it looks like all blend modes are set to Normal. Additionally, the project is experiencing a generic slowdown and it sounds like this caching issue would only affect initialization.

Message 9 of 11
Anonymous
in reply to: SFjenkink

Anonymous
Not applicable

I made it so Render_Primitive.h::BlendPrimitive::GetBlendMode() returns Blend_Normal instead of BlendModeValue and that made performance better in other screens that were slowing down, but also introduced a few artifacts (as expected). This isn't a valid solution and also didn't help with the loading issue in the demo I sent over. Scaleform seems to think that all of my movieclips are set to Blend_Layer instead of Blend_Normal. I also tried forcing the blendMode in ActionScript, but it still remained as Blend_Layer.

 

I assume that my Blend_Normal modification is not a full block of all other blend modes. Is there any way to disable all Advanced blend modes and only allow Blend_Normal?

Reply
Reply
0 Likes

I made it so Render_Primitive.h::BlendPrimitive::GetBlendMode() returns Blend_Normal instead of BlendModeValue and that made performance better in other screens that were slowing down, but also introduced a few artifacts (as expected). This isn't a valid solution and also didn't help with the loading issue in the demo I sent over. Scaleform seems to think that all of my movieclips are set to Blend_Layer instead of Blend_Normal. I also tried forcing the blendMode in ActionScript, but it still remained as Blend_Layer.

 

I assume that my Blend_Normal modification is not a full block of all other blend modes. Is there any way to disable all Advanced blend modes and only allow Blend_Normal?

Message 10 of 11
Anonymous
in reply to: Anonymous

Anonymous
Not applicable
Hi SFjenkink. Frank has been trying to resolve this issue for quite some time. UW is my company. We can not launch our game until
this issue is resolved. We have been experiencing this problem since June 8th. Is there anyone there who can shake the trees for an answer and get something done so we can move forward with our launch? We would really appreciate your immediate attention to this issue. Thanks so much.
Reply
Reply
0 Likes

Hi SFjenkink. Frank has been trying to resolve this issue for quite some time. UW is my company. We can not launch our game until
this issue is resolved. We have been experiencing this problem since June 8th. Is there anyone there who can shake the trees for an answer and get something done so we can move forward with our launch? We would really appreciate your immediate attention to this issue. Thanks so much.
Message 11 of 11
SFjenkink
in reply to: Anonymous

SFjenkink
Alumni
Alumni

Hi sarahbaley my apologies for the delay Ive been working with our senior rendering engineer trying to get this resolved. He believes that something within the content is causing the layer blend mode to be set, and trying to change the functions in the headers will undoubtedly cause corruption. However for the level of support needed to resolve the issue at this point will require you guys to either purchase a support contract or source license. I can put you in contract with sales (Rian Turgeon rian.turgeon@autodesk.com) to get this taken care of, then we will be able to further assist. 

Reply
Reply
0 Likes

Hi sarahbaley my apologies for the delay Ive been working with our senior rendering engineer trying to get this resolved. He believes that something within the content is causing the layer blend mode to be set, and trying to change the functions in the headers will undoubtedly cause corruption. However for the level of support needed to resolve the issue at this point will require you guys to either purchase a support contract or source license. I can put you in contract with sales (Rian Turgeon rian.turgeon@autodesk.com) to get this taken care of, then we will be able to further assist. 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report