IBM Worklight 7.0 with Sencha Touch How to optimize Application?

137 views Asked by At

I am Working on an IBM Worklight 7.0 Hybrid mobile application with Sencha touch 2.4 . It initially takes too much time to load. The network load for the application shows an idle time for about 10 sec when monitored using the chrome developer tool.

3

There are 3 answers

2
Trozdol On

To add to @IdanAdar Answer:

Don't know if you are using Sencha CMD or not but it doesn't sound like you are.

In the Terminal or equivalent in Windows:

$ cd to/your/project/directory

$ sencha app build build         # runs a build, warns about errors

$ sencha app build testing       # combines js files but not uglified

$ sencha app build production    # minifies project 

This should create a build folder in your project with a deployable versions of each kind of build if you have run the command.

MyProject/build/production/MyApp

EDIT:

In your app.js you have a

Ext.application({

name: 'MyApp',

requires: [
    // Are you loading everything here?
    // If you have framework classes that are not 
    // in your initial views you could move them
    // to a subview in.. requires: ['Ext.field.CheckBox','Ext.etc']
],

models: [...],

stores: [...],

    // Are you loading all of your views here?
    // If you can get away with loading nested views try that.

views: [
    'Main'
],

controllers: [...],

icon: {...},

isIconPrecomposed: true,

startupImage: {...},

launch: function() {

    Ext.create('IntakEase.view.Main', {fullscreen: true});
}

There's many other possible things.

Are you loading any external Classes?

0
Idan Adar On

To reduce application load time you can do several things:

  1. Do not connect to the server on application launch is it is not required
  2. Use minification and concatenation to reduce network load by making the app 'smaller'
  3. Make sure you are not adding to your project stuff that you're not actually using
0
Vivin K On

The initial delay to load might be owing to the sizeable app.css that has to be parsed and rendered (about 1.2 MB).

The same query and solution is mentioned in the Sencha blog here.