-
Type: Bug
-
Resolution: Cannot Reproduce
-
Priority: Major - P3
-
Affects Version/s: 1.9.2
-
Component/s: None
-
Labels:None
-
Environment:Windows 7
ruby 1.9.3p385 (2013-02-06) [i386-mingw32]
When i compare performance with version 1.6.1 of the driver i get the following results for 1000 finds.
Version 1.6.1
0.109000 0.062000 0.171000 ( 0.232013)
Version 1.9.2
0.062000 0.000000 0.062000 ( 7.334419)
Used the following code
require 'benchmark'
require 'mongo'
mongo_client = Mongo::Connection.new('localhost', 27017)
db = mongo_client.db('sample-db')
col = db.collection('requests')
time = Benchmark.measure do
(1..1000).each { |i| col.find({:key => i}).next_document }
end
puts time