Results 1 to 5 of 5

Thread: Start up speed

  1. #1
    Sencha User
    Join Date
    Dec 2010
    Posts
    16

    Question Start up speed

    Hi,

    I was wondering what the standard load time is expected to be in iOS 4 when you add the page to your home screen, before it gets to loading content. I spent many hours building a Sencha Touch app for a mobile version contracted by a client. I think it looks great, but they're insisting 7-8 seconds for startup time is unacceptable and I'll have to scrap the entire app if I can't improve this time. They're comparing it to a straight HTML mobile version of another app they use, which is about 2 seconds startup for safari and a few kb of html. I've argued that the increased user experience is worth the trade-off, but they're not convinced. I'm using all minimized JS. Appreciate any feedback on the subject.

  2. #2
    Touch Premium Member
    Join Date
    Oct 2010
    Posts
    93

    Default

    I'm using headjs to cut down on initial script load times. Basically I only load sencha and then the main script of my app so that you see the first screen, it then continues to load my other scripts in the background, that way it appears to load faster.

    http://headjs.com/

  3. #3
    Touch Premium Member
    Join Date
    Jun 2010
    Posts
    324

    Default

    Did headjs improve your startup? Also make sure you are using the non debug sencha files.

  4. #4
    Touch Premium Member
    Join Date
    Oct 2010
    Posts
    93

    Default

    Yes it improved them quite a bit my app was taking around 8 seconds to show the main screen, it now takes about 3-4 seconds to show the main screen. All my files are minimized including my sencha js file. In my html file I only load sencha, headjs, index.js, structure.js files that contains the startup script for my app similar to the index.js and structure.js found in kitchensink. After index.js loads in the onReady I have headjs load the remaining js files for my app.

    Now the problem with doing it this is is that the card structure is not defined, however you can easily check for this when you do a setActiveItem and set the card value since by the time the user clicks on something your app would have loaded completely.

    Here is how my index file looks like.

    Code:
    <head>
            <meta charset="UTF-8" />
            <title>OIS iMobile</title>
    		<link rel="stylesheet" href="./STJSLib/sencha-touch.css" type="text/css">
    		<link rel="stylesheet" href="./src/css/ois.css" type="text/css">
    		<script type="text/javascript" src="./STJSLib/sencha-touch.js"></script>
    		<script type="text/javascript" src="./src/libs/head.js"></script>
    		<script type="text/javascript">
    			function InitApp() {
    				Ext.getBody().mask('<div class="loading">Loading&hellip;</div>', true);	
    				head.js("./src/index.js","./src/structure.js");
    			}
    		</script>
        </head>
        <body onload="InitApp()">
        </body>

  5. #5
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,379

    Default

    You need to make sure you don't do too much at start up also.

    Make sure you are not using the debug file as it more than doubles the file size.

    Also, you can use JSBuilder to strip out things that you don't need. If you aren't using DataViews in your app, get rid of them.
    Mitchell Simoens @LikelyMitch

    Check out my GitHub:
    https://github.com/mitchellsimoens

    Posts are my own, not any current, past or future employer's.

Similar Threads

  1. Speed Issue
    By TheBuzzer in forum Ext GWT: Discussion
    Replies: 14
    Last Post: 15 Mar 2010, 6:44 AM
  2. coding for speed up
    By steffenk in forum Community Discussion
    Replies: 4
    Last Post: 4 Mar 2010, 6:38 AM
  3. Speed of my app compared with 2.3
    By mschering in forum Ext 3.x: Help & Discussion
    Replies: 6
    Last Post: 9 Feb 2010, 2:55 AM
  4. Speed up ext
    By mschering in forum Ext 2.x: Help & Discussion
    Replies: 6
    Last Post: 17 Sep 2008, 10:23 AM
  5. extjs speed!
    By onassar1 in forum Community Discussion
    Replies: 3
    Last Post: 11 May 2007, 5:28 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •