[CSHARP-1527] Speed up encoding and decoding of binary BSON CStrings Created: 11/Jan/16 Updated: 23/Sep/16 Resolved: 29/Jan/16 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | BSON |
| Affects Version/s: | 2.2.1 |
| Fix Version/s: | 2.3 |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Robert Stam | Assignee: | Robert Stam |
| Resolution: | Done | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
The current implementation of encoding and decoding of binary BSON CStrings takes two passes. 1. When encoding, one pass to encode and a second to verify that the resulting CString has no null bytes Both directions can be sped up by writing a custom UTF8 encoder that uses a single pass. |
| Comments |
| Comment by Githook User [ 29/Jan/16 ] |
|
Author: {u'username': u'rstam', u'name': u'rstam', u'email': u'robert@robertstam.org'}Message: |
| Comment by Githook User [ 29/Jan/16 ] |
|
Author: {u'username': u'rstam', u'name': u'rstam', u'email': u'robert@robertstam.org'}Message: |
| Comment by Robert Stam [ 29/Jan/16 ] |
|
As it turned out we were able to speed up encoding significantly but the improvements to decoding were so minor that we decided to leave decoding alone. |