0

I have thousands of JSON objects in my ASP.NET MVC project. I want to quickly save and load them to/from the file system and parse to JSON.

My current implementation is just save all the data into text file (file content is in json format). But sometimes this save takes around a few minutes. Is there a way of optimizing this?

Luiso
  • 4,173
  • 2
  • 37
  • 60
lsc
  • 681
  • 3
  • 8
  • 26
  • You might want to look into [Bson](http://bsonspec.org/). – juharr Feb 04 '17 at 19:23
  • 1
    How large are the files you are dealing with, MB, GB? Also, what library are you using right now to take care of the serialization/deserialization code. Maybe include some samples of the code you are using – Luiso Feb 04 '17 at 19:35
  • 2
    To quote [Erik Lippert](https://ericlippert.com/2012/12/17/performance-rant/): *Use a profiler or other analysis tool to determine empirically where the bottleneck is before you start investigating alternatives.* Once you've done that and found your actual problems, then we (or http://codereview.stackexchange.com/) may be able to give solutions. See also [Fastest way to serialize and deserialize .NET objects](http://stackoverflow.com/q/4143421/3744182). – dbc Feb 04 '17 at 20:15

0 Answers0