-
13 Apr 2012 5:09 AM #1
JavaScript execution exceeded ( iPhone 3G )
JavaScript execution exceeded ( iPhone 3G )
Hi,
Sencha Version: 2.0
Device : iPhone 3G
Browser: safari
I converted my app into production mode and the size of my app.js file is 720 KB, this means that my app is a big one
so when I open my app on safari in iPhone 3G I get this error "JavaScript execution exceeded timeout", On refreshing several times the application shows up but most of the time I get this error, I am not sure why this is happening, the application works fine on iPad and iPhone 4.
Any help is appreciated.
-
13 Apr 2012 6:36 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,666
- Vote Rating
- 435
What iOS version is on your iPhone 3G?
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
13 Apr 2012 6:46 AM #3
-
13 Apr 2012 9:04 AM #4Sencha - Sencha Touch Dev Team
- Join Date
- Mar 2007
- Location
- Redwood City, California
- Posts
- 3,652
- Vote Rating
- 14
There still shouldn't be so much execution time that would trigger that problem. I wonder if it's the caching on that device from localstorage. Can you try turning that off in your app.json file?
-
13 Apr 2012 9:10 AM #5
How can I turn off local storage cache in app.json ?
-
13 Apr 2012 9:20 AM #6
Here is my app.json file
What should I do to disable local storage caching.Code:{ /** * The application's namespace, used by Sencha Command to generate classes */ "name": "Application", /** * List of all JavaScript assets in the right execution order. * Each item is an object with the following format: * { * "path": "path/to/script.js" // Relative path to this app.json file * "update": "delta" // (Optional) * // - If not specified, this file will only be loaded once, and * // cached inside localStorage until this value is changed. * // - "delta" to enable over-the-air delta update for this file * // - "full" means full update will be made when this file changes * * } */ "js": [ { "path": "sdk/sencha-touch.js" }, { "path": "resources/js/jquery-1.3.2.min.js" }, /*{ "path": "resources/js/touch-charts.js" },*/ { "path": "app.js", "update": "full" } ], /** * List of all CSS assets in the right inclusion order. * Each item is an object with the following format: * { * "path": "path/to/item.css" // Relative path to this app.json file * "update": "delta" // (Optional) * // - If not specified, this file will only be loaded once, and * // cached inside localStorage until this value is changed to either one below * // - "delta" to enable over-the-air delta update for this file * // - "full" means full update will be made when this file changes * * } */ "css": [ { "path": "resources/css/m.css", "update": "full" }/*, { "path": "resources/css/touch-charts.css", "update": "full" }*/ ], /** * Used to automatically generate cache.manifest (HTML 5 application cache manifest) file when you build */ "appCache": { /** * List of items in the CACHE MANIFEST section */ "cache": [ "index.html" ], /** * List of items in the NETWORK section */ "network": [ "*" ], /** * List of items in the FALLBACK section */ "fallback": [] }, /** * Extra resources to be copied along when build */ "extras": [ "resources/img", "resources/icons", "resources/loading" ], /** * Directory path to store all previous production builds. Note that the content generated inside this directory * must be kept intact for proper generation of delta between updates */ "archivePath": "archive", /** * Default paths to build this application to for each environment */ "buildPaths": { "testing": "build/testing", "production": "build/production", "package": "build/package", "native": "build/native" }, /** * Build options */ "buildOptions": { "product": "touch", "minVersion": 3, "debug": false, "logger": "no" }, /** * Uniquely generated id for this application, used as prefix for localStorage keys. * Normally you should never change this value. */ "id": "ded8b050-6ebe-11e1-b99d-8155f85dc34f" }
-
13 Apr 2012 9:30 AM #7Sencha - Sencha Touch Dev Team
- Join Date
- Mar 2007
- Location
- Redwood City, California
- Posts
- 3,652
- Vote Rating
- 14
Let me verify and get back with you.
-
13 Apr 2012 12:46 PM #8Sencha - Sencha Touch Dev Team
- Join Date
- Mar 2007
- Location
- Redwood City, California
- Posts
- 3,652
- Vote Rating
- 14
Instead of doing a production build, do a package build (sencha app build package). This should avoid the microloader completely.
-
14 Apr 2012 1:46 AM #9
Thanks Jamie, By doing this my application is now working on iPhone 3G, but it is slow as compared to the production mood any idea how can I use production mood ?
Again thanks for your guidance.
-
16 Apr 2012 9:01 AM #10Sencha - Sencha Touch Dev Team
- Join Date
- Mar 2007
- Location
- Redwood City, California
- Posts
- 3,652
- Vote Rating
- 14
The only real difference there is the caching in localstorage. Apple did a lot in iOS5 to speed up the javascript engine, it's a shame that they didn't give it to the older 3G. Perhaps breaking your application into 2 files would help.
Wait! Looks like we don't have enough information to add this to bug database. Please follow this template bug format.


Reply With Quote