-
Type: Improvement
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 2.6.5, 2.7.3, 2.8.0
-
Component/s: Performance
-
None
-
Fully Compatible
Finalizers can have a negative affect on overall GC throughput. DBApiLayer.Result has a finalize method which pushes the cursor onto a queue of dead cursors for later cleanup. The problem is that driver users still pay the cost of of the finalizer in these cases:
- they are diligent about closing cursors
- findOne, or any query with a negative batch size or other situation where there is no cursor maintained on the server to clean up.
We can address this in two ways
- Add option to MongoOptions to allow driver users to disable the finalizer
- Always disable the finalizer when there is no cursor maintained on the server (cursor == 0 in query response)
- is depended on by
-
JAVA-601 Throughput mongo java driver Versus mongo C driver
- Closed