mongodb/mongo-java-driver — pull request #66 by thkala (2012-03-16 00:34:36+00:00)
Title: Performance enhancements for the MongoDB Java driver

After several runs under a profiler for a specific use case, a few alterations resulted in a noticeable throughput increase. The improvement was consistently measured in the 10-15% range (or better - this number is rather conservative). This changeset affects three classes:

- Adjustable socket input buffer in `DBPort`, set by default to 64K
- Optimizations in `PoolOutputBuffer`
- A significantly faster version of `BasicBSONDecoder$BSONInput.readCstr()`

The target benchmark was a single-threaded dump of a collection that contains mostly ASCII C-style strings. The changes are self-contained - each commit can be applied independently. The test suite passes cleanly on my own single-server setup. Considering the particulars, I believe these changes to be an improvement with no potential for adverse effects.