-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
-
Labels:None
Hi,
I'm working on an application that has a model called Ride with a :embeds_many relation with another model called Record. My app receives a big JSON coming from a parser and basically I would execute:
Ride.create!(big_json_response)
Inside the JSON object there are some properties from the Ride and an array of Records (more than 10K in some cases). However I was experiencing a very slow insertion of a Ride (more than 16 seconds sometimes).
Since I removed MongoID and used directly the mongo-ruby-driver I saw a big decrease to 1, 2 seconds at max. Using a bulk insert of the Records would have helped?
Setup: MacBook Air, 1,3 GHz Intel Core i5, 4 GB 1600 MHz DDR3,
MongoID 4.0.1, tried with Mongo 2.6 and Mongo 3.0
Cheers