Search code examples
performancetimeserverloadibm-cloud

Make Bluemix App Faster


I have recently deployed my app to Bluemix. Currently, the settings are 256mb of Memory and 1 instance. What would you suggest increasing/altering to get better performance? Right now the main page takes 8-15 seconds to load and ajax calls take at least 5 seconds. The app is pretty intensive on HTTP requests (ajax calls), however the calls themselves are relatively simple scripts. I'm just looking for some guidence on what I should change and what I should change it to to see better performance.

Thank you,

--

EDIT:

The front-end of the app is written in React.js and some jQuery. The backend is PHP and mustache (for the views) and we use SQL. Most of the AJAX requests are handled by React.js—it makes varying-sized JSON requests.


Solution

  • I don't think increasing your memory or instances will have much effect on your UI performance if the bottleneck is your AJAX request response times.

    Use your browser Developer Tools to monitor the Network Activity tab. See which of your AJAX requests are taking the longest time to respond and tackle those first. Confirm you aren't forcing no-cache. Avoid calling the same URL multiple times - instead, save the result in javascript and reuse.

    Database queries tend to be the bottleneck for most applications. Use caching services like Bluemix Data Cache or an in memory cache to avoid going to a database multiple times per request.