By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,605 Members | 2,147 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,605 IT Pros & Developers. It's quick & easy.

Large amounts of data in javascript

P: 1
Hi there,

For an internship I'm currently doing I need to be able to process large amounts of data in javascript. It's sort of a cash register system on which it's possible to see the current stock in real time for example. There can be as many as 6000 items in the stock. So performance is quite an issue. The original idea was to load a list with all of the items in it and then shrink the list based on searchterms entered. We've tried using XML and it seems to be impossible to get acceptable performance this way. Would it be possible to achieve this with JSON or plain text for example? Or should we limit the system to only send a limited amount of data based on what's entered (so if nothing is entered either show only the first ~500 items or nothing at all)?
Sep 8 '06 #1
Share this Question
Share on Google+
2 Replies


acoder
Expert Mod 15k+
P: 16,027
Unless you're using Ajax, this data should not be stored on the client-side.

If using Ajax, only display a limited data set as you've suggested. JSON is a good alternative to XML.
May 6 '08 #2

gits
Expert Mod 5K+
P: 5,343
yes ... JSON is much better to handle such amounts of data. the problem with chunks of data is of course that you cannot sort/filter the entire dataset without a new server-request since you need all data for that but i don't think there is a good recommendation for the trade-off so here are just some of my experiences ... we used to process similar and greater amounts of data here for us but in some cases we even decided to make a new call to request the filtered data ... this happend after a kind of 'trial'-period ... when the initial loading time gets too long we often decide to get the data later on ... even when we know that the data has to be loaded in any case ... because for the user (or better to say our! users) it seems to be better to have a quite fast responding application even when it loads and they accept some loading-times during the applications lifecycle ... instead of waiting a long time to start to work in it. so i just could recommend to test it out ... and don't forget different scenarios (bandwidth, client-machines etc.) ...

kind regards
May 6 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.