6 Replies Latest reply on Feb 14, 2014 6:52 PM by Venkatasubbaiah Chenna

    SB1 Performance on remote apps better than local ones

    Daniel Goncalves



      I noticed that my app performs better when it's on a server and the SB1 access it remotely instead of copying it to the device itself.


      One example is with Knockout.js, when it's a local app it shows the 'slow app' warning frequently when doing the ko.applyBindings even if it was just 2 seconds passed and the configuration says it should wait 30 seconds to show the warning.


      When I publish it to a server and access it remotely it doesn't show this warning and it seems it runs smoother. Is this because some caching mechanism that happens server side? or is there a way to improve performance on local apps?



        • Re: SB1 Performance on remote apps better than local ones
          Peter Arcuri

          While the SB1 could render local web pages, it is designed to run server-based web apps. I believe it is documented as such.

            • Re: SB1 Performance on remote apps better than local ones
              Daniel Silva

              I would agree with Peter, this device is more suited to use as a thin client pointing to a web server, and I would strongly suggest using it that way if possible. And note that the device does support HTML5 offline capabilities, so you could write your app as a web app hosted on a web server but still have it able to function if it loses connectivity.  But it should also be possible to run an app hosted on the device within reasonable constraints.  If the same app works better from a server,  maybe as you say the server is helping out somehow, but there may be a few other things to look at.


              If by the Slow app warning you mean the "System Message" that says the application is busy or not responding, I would suspect that maybe when you are running on the device, you are not including the link to asl.js on all pages (or maybe the path is wrong).  This will cause this type of issue, along with several other issues (non working keyboard, home button, badge screen, etc).  You will probably also want to use the internal web server if you aren't doing that already.  So in apps.json, set up the app as

              "url": "",

              rather than

              "url": "/UserDrive/apps/MyApp.html",


              In the UserDrive, you should see a file named log.txt (using the debug usb back housing).  Take a look at this file and see if it might show you any errors that might point you to what the issue(s) might be.  For one thing, it might show that it can't find asl.js in the path you are providing.


              Another note, if you are expecting this app to make calls to a web service, you will probably find that you will have cross domain issues if you are hosting the app locally on the device.  If you have control of the server, you may be able to get around this, but if not, you will likely be stuck.  This is a big reason to consider hosting the app on a web server rather than on the device.

              1 of 1 people found this helpful