locked
Performance suspend failed.

    Question

  • Hi there,

    WACK reports performance suspension failure as follows on my Metro style app written in JS/HTML. Windows 8 and VS2012 are both RTM.

    I can suspend the app quickly and almost instantly using VS2012. 

    Can anyone let me know how to analyze WACK data below to learn how WACK logs time elapsed and any helpful stuff in this test?

    I put all in ~/AppData\Local\Microsoft\AppCertKit at SkyDrive:

    https://skydrive.live.com/?cid=9974AEF1CE124847&id=9974AEF1CE124847%21134#cid=9974AEF1CE124847&id=9974AEF1CE124847%21337

    Performance test 
    PASSED
    Bytecode generation
    PASSED
    Performance launch
    FAILED
    Performance suspend
    • Error Found: The performance suspend test collected the following results:
      • Application Error: Application Suspend was not detected for application App. This could be because your application failed to suspend correctly. Please consider re-running the test avoid interacting with the application while tests are running.
    • Impact if not fixed: Application suspend time is important for creating a fast and fluid experience for the user. This app will not be accepted by the Windows Store.
    • How to fix: The app received a failing score. You should ensure that your app’s performance is consistent across different machine configurations. The informational metrics can provide insight into area that could help improve your app’s performance, but do not impact your apps acceptance by the Windows Store. See link below for more information:
      Performance Best Practices

    Many thanks!

    -Claus Lin

    Wednesday, September 05, 2012 10:42 AM

Answers

  • I am using the suspend handler in the Navigation template.

        app.oncheckpoint = function (args) {
            app.sessionState.history = nav.history;
        };

    I comment out the following line to solve or avoid the WACK failure:

                if (app.sessionState.history) {
                    //nav.history = app.sessionState.history;
                }

    I don't know the root cause yet. I guess it's something of navigation.

                    if (nav.location) {
                        nav.history.current.initialPlaceholder = true;
                        return nav.navigate(nav.location, nav.state);
                    } else {
                        return nav.navigate("/pages/xxx/xxx.html");
                    }

    @Jeff: Many thanks! Your question helped me review the handler and the data in the handler. Although the failure is called performance suspend, it's resulted from program activation according to my work around.

    Many thanks!

    -Claus

    • Marked as answer by Dino He Monday, September 24, 2012 4:25 AM
    Tuesday, September 11, 2012 9:40 AM

All replies

  • Back in the Consumer preview days when I took my @Win8RSSReader to one of the Microsoft PFEs in the Excellence Lab, she said to me that Failed is actually fine but it did take couple of tries to get even that, so may be dont worry to much.

    Zubair Ahmed | @zubairdotnet | zubairahmed.net | Win8RssReader.codeplex.com | facebook.com/zubair.ahmed.public

    Wednesday, September 05, 2012 11:09 AM
  • The store will run this tool so you need to ensure you suspend within 5 seconds before submitting!  Did you follow the link for Performance Best Practices?

    What are you doing in your suspend handler?

    -Jeff


    Jeff Sanders (MSFT)

    Wednesday, September 05, 2012 3:42 PM
    Moderator
  • Hi Jeff,

    No, my suspend handler barely does nothing.

    I tried another tool: appperfanalyzer_js.exe and the result below was good. I don't have any idea why WACK reports a failure while "The longest suspend event took 52ms."

    Successful Suspend

    A well-behaved app successfully suspends when moved to the background. If an app does not suspend quickly enough when moved to the background, the system terminates it. Resuming an app is faster than re-launching it. This test inspects whether the app fails to suspend within the allotted time. One common cause of failure is trying to save too much state information when suspending. To learn more about how to successfully suspend, please see Optimizing your app's lifecycle

    • Result: Corel PhotoEvents successfully suspended. 1 suspend events were encountered. The longest suspend event took 52ms.

    -Claus

    Thursday, September 06, 2012 4:13 AM
  • RE: No, my suspend handler barely does nothing.

    What DOES it do?  Helping you without any code is a bit like diagnosing a patient without every seeing him or her.

    -Jeff


    Jeff Sanders (MSFT)

    Friday, September 07, 2012 2:27 PM
    Moderator
  • I am using the suspend handler in the Navigation template.

        app.oncheckpoint = function (args) {
            app.sessionState.history = nav.history;
        };

    I comment out the following line to solve or avoid the WACK failure:

                if (app.sessionState.history) {
                    //nav.history = app.sessionState.history;
                }

    I don't know the root cause yet. I guess it's something of navigation.

                    if (nav.location) {
                        nav.history.current.initialPlaceholder = true;
                        return nav.navigate(nav.location, nav.state);
                    } else {
                        return nav.navigate("/pages/xxx/xxx.html");
                    }

    @Jeff: Many thanks! Your question helped me review the handler and the data in the handler. Although the failure is called performance suspend, it's resulted from program activation according to my work around.

    Many thanks!

    -Claus

    • Marked as answer by Dino He Monday, September 24, 2012 4:25 AM
    Tuesday, September 11, 2012 9:40 AM