Fastest Local Javascript Database

What would be the best format to store a relatively large amount of data (essentially a large hash file) for fast extraction using javascript? It must also support Unicode.

XML, JSON?

+2


source to share


3 answers


Giant javascript objects are usually a sign that you are trying to do something that you really don't need to do. XML is even worse, it needs to be parsed to form meaningful data.

In this case, an AJAX request to a RESTful interface for a proper database backend will probably serve you well.



Accessing a Javascript object (especially for any request without accessing a single element by its hash) is very slow compared to the underlying database.

+4


source


There is good human research on Flickr on this topic. They ended up with csv over xml and json.



+2


source


JSON is definitely superior to XML for performance reasons.

But querying the DB on the backend is likely to be the only feasible solution after reaching a certain scale, since local resources cannot match pulling data from a large storage versus a DB.

0


source







All Articles