[CDRIVER-1331] Avoid realloc in bulk execution Created: 16/Jun/16 Updated: 10/Aug/16 Resolved: 05/Jul/16 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | Bulk API, libmongoc, Performance |
| Affects Version/s: | None |
| Fix Version/s: | 1.4.0 |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | A. Jesse Jiryu Davis | Assignee: | Ian Boros |
| Resolution: | Done | Votes: | 0 |
| Labels: | intern2016 | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
_mongoc_write_command splits a stream of documents (all inserts, all updates, or all deletes) to the server 16 mb at a time. Between each 16 mb batch it destroys the command document cmd and reinitializes it. This wastes time in malloc. Just bson_reinit it after the first batch, and bson_destroy only at the end. |
| Comments |
| Comment by Githook User [ 05/Jul/16 ] |
|
Author: {u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@emptysquare.net'}Message: Merge pull request #343 from puppyofkosh/
|
| Comment by Githook User [ 05/Jul/16 ] |
|
Author: {u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@emptysquare.net'}Message: Merge pull request #343 from puppyofkosh/
|
| Comment by Githook User [ 05/Jul/16 ] |
|
Author: {u'name': u'ian boros', u'email': u'ian.boros@10gen.com'}Message: |
| Comment by A. Jesse Jiryu Davis [ 16/Jun/16 ] |
|
Changing my mind, reassigning this from Fiona to Ian. |
| Comment by A. Jesse Jiryu Davis [ 16/Jun/16 ] |
|
Out of curiosity, try a simple benchmark to see if a very large number of inserts, updates, or deletes is measurably faster. |