javascript - How costly are trips to server for single page applications? -
I am creating a single page app that will run on your average tablet, so the resources are not very comprehensive.
I am initially thinking about retrieving all the data needed for the application and storing it in TaffyDb - the local Javascript database - and instead of doing a local query every time a user Point to the event handler. / P>
I was wondering who would be better in terms of speed / memory. All data is stored locally on TaffyDb, or is recovering the required information every time. Data is simple JSON objects, maximum 10.
I have seen an estimate that approximately 40,000 machine instructions for executing the cost of each HTTP request
- Connected (all the time) This is very dear on mobile phones.
But I'm focusing on another aspect -;
- Disconnect occasionally;
- Occasionally connected;
- Disconnected.
Each case needs its strategy, for example # 3 will definitely mean local dB and some synchronization. For # 2 this is enough to do some local caching with ordinary 15 minutes (or so) end time.
It looks like you choose # 3. You need to think about the client / server synchronization. It may not be too slight on some data architecture.
Comments
Post a Comment