Loading many stores at once


Applications usually need many stores to be filled with data. For the purposes of this explanation we can classify these stores as normal (or dynamic if you wish) where data is changed by users then it is saved to the server or new data is loaded from the server for the user to interact with. The other stores hold data that is never changed during the application lifetime – I call them static stores. These are various lists: genders, states, countries, types of other items, etc.

Now, when the application starts we have to load these stores so we usually wind up with 20-100 initial Ajax server requests. That does have a negative effect both on the client application startup time but also on the server that is loaded with many often unnecessary requests.


Hence, what we need and want is the reduction of the number of initial server requests to the minimum.


This example shows how it can be easily done. We send the initial one request asking server to deliver data for all static stores, the response is decoded, data saved and all static stores populated with their records.

Live Demo

Open example in new window.

Main Features

  • improves application startup time
  • decreases server load
  • very simple, easily understood
  • shows where to store constant data
  • configurable, stores can be added removed easily
  • easily integrated with Simple Login System

Use Case

This example finds its use in any (bigger) application that uses one kind of constant lists or another. It is suitable not only for combos but also for grids, trees, charts, dataviews; in any component that is backed by a store.

Do not use it for stores where data can be modified by the user or often refreshed from the server. Use stores with proxy configuration in these cases.

Example Files (relative to example root)

The example has been initially generated with sencha generate app in a workspace. The following list contains only the relevant files:

If you want to see the example code, login or sign-up. Free membership is available.
Follow me:


I'm a well seasoned developer, consultant and educator of web applications based mainly on Sencha libraries, PHP, MySQL and Node.js. Besides (Apple) computers, I love photography and mountain biking.
Follow me:

Latest posts by Saki (see all)


  1. Nelson Silva says

    Thanks for the example. I have a question, I have a window with 10 combos in there and this takes a while to load, too much info, can i use this technique to load them faster? How does the data looks like in json?


    • says

      Although I cannot guarantee that, it is worth to try. You save 9 requests – that can make a difference. As to format, see the network tab; you can analyze the server requests and responses.

    • says

      As to loading stores, the main time here would most likely be receiving the response. Of course, it’s just my idea, I haven’t tested it. For the progress bar to show a reasonable value, you might set it to let’s say 20% before you send the request, to something like 30-50% when the response arrives and then move it some percentage up to 100% on after each store load.

      This wouldn’t give the real progress, but it would at least show the user that something is going on.

  2. Petr Šnobelt says

    It looks like good idea BUT if you set your server and proxy stores correctly – they load json only first time and then retrive data from cache. So impact of this solution is only on first time load – and if user see app first time some delay on store load is not a problem…

    • says

      Exactly! Those static stores are only loaded at the application start even with proxies as you say. However, the idea of the technique is different. The purpose is to minimize number of server requests at the application startup.

      I’ve recently supervised development of a large app that sent 50-70 requests just to load lists. The application startup was 10-30 seconds both due to client and server overload.

      Of course, if your application is different and you save little, then don’t bother to implement it.

We will be happy to hear back from you

Please Login to post a comment