[CSHARP-1092] Optimize output of BSON arrays by caching index names Created: 03/Nov/14 Updated: 15/Nov/14 Resolved: 15/Nov/14 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | BSON |
| Affects Version/s: | 1.9.2 |
| Fix Version/s: | 2.0 |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Robert Stam | Assignee: | Robert Stam |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
Currently when BSON arrays are output the names of the indexes (as required by the BSON spec) are computed by calling Int32.ToString and then encoding the string to UTF8. It should be considerably faster to cache the UTF8 values of commonly used index names (say the first 1000 or so). |
| Comments |
| Comment by Githook User [ 15/Nov/14 ] |
|
Author: {u'username': u'rstam', u'name': u'rstam', u'email': u'robert@robertstam.org'}Message: |
| Comment by Githook User [ 15/Nov/14 ] |
|
Author: {u'username': u'rstam', u'name': u'rstam', u'email': u'robert@robertstam.org'}Message: |
| Comment by Githook User [ 15/Nov/14 ] |
|
Author: {u'username': u'rstam', u'name': u'rstam', u'email': u'robert@robertstam.org'}Message: |