Would you like to contribute to the Titanium docs? To get started, sign up for an account on the Appcelerator Wiki and sign our CLA.

Skip to end of metadata
Go to start of metadata

This guide provides best practices for creating and deploying applications to .

Content

Improving Application Network Performance

The distance between a server and client can increase the network latency experienced by your application. The data center is located in the Oregon, USA region. Your application users may be anywhere, so it's important to understand how you can reduce network latency in your application.

  • Use data caching. Using an in-memory data cache in your application, when possible, to minimize network requests or file reads, can significantly improve overall application performance. For instance, if your application makes a query that is not very time-sensitive, cache the result of the first query for an appropriate period of time.

  • Minimize the size of the response payload. Enable ZIP data compression in your responses, and only include data that is essential to the current state of the application. A common approach to improve mobile application performance is to use one API call to synchronously retrieve a minimum data set to display on the device, and then one or more asynchronous calls to load additional data, as needed.

  • Avoid using to transfer large sets of data to clients. If your application aggregates large sets of data that don't change often, you can increase performance by uploading those assets to an online storage or content-delivery service, such as Amazon S3 or Amazon CloudFront. The client would make an API call to to obtain the URL of the CDN-hosted data, and then make another API call using this URL to download the real data.

  • Use a CDN to store static contents. In general, your application should not be used to serve lots of static assets. Developers are encouraged to move all of their application's static contents to a CDN (Amazon CloudFront, for example) and have the client load those assets from there.

Improving Application Performance and Memory Usage

  • Minimize output logs. To improve application performance and reduce memory consumption, minimize the amount of console logs your application produces.