Best way to store content
I'm creating a reference app and have a big XML with a lot of content.
What is the best way to store and load it?
(I'm mainly concerned with performance).
The content is static, so I can convert it to whatever is best.
Possibilities:
XML file, and load and parse it on startup (I fear this is going to be slow)
JSON file
Include a .js file that contains a js object with the content
Database
Some other way?
2 Answers
-
I think database.
Parsing a file or evaling a huge string into the memory will kill the cpu.
Sqlite it's a file too, but at least its access it's optimised.
-
bump.