[JAVA-2107] Stop using DBObject.keySet when decoding Created: 04/Feb/16 Updated: 16/Feb/16 Resolved: 05/Feb/16 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | Performance |
| Affects Version/s: | 3.0.0 |
| Fix Version/s: | 3.2.2 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Roger Kapsi | Assignee: | Jeffrey Yemin |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Description |
| Comments |
| Comment by Jeffrey Yemin [ 16/Feb/16 ] |
|
Closed for 3.2.2 release |
| Comment by Jeffrey Yemin [ 05/Feb/16 ] |
|
Roger, Instead of changing StringRangeSet, I fixed the performance issue you are seeing by short-circuiting the call to keySet() in DefaultDBCallback.objectDone when the type is a BasicBSONList. |
| Comment by Githook User [ 05/Feb/16 ] |
|
Author: {u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}Message: |
| Comment by Githook User [ 05/Feb/16 ] |
|
Author: {u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}Message: |
| Comment by Jeffrey Yemin [ 04/Feb/16 ] |
|
Perfect, thanks. We'll take a closer look and get this fixed one way or the other. |
| Comment by Roger Kapsi [ 04/Feb/16 ] |
|
I don't have any specifics other than running YourKit (with CPU tracing) in our production environment and StringRangeSet showed up. It appears to be called from DBCursor (I'm including a screenshot of the call tree). We don't have any direct use-cases of that class. |
| Comment by Jeffrey Yemin [ 04/Feb/16 ] |
|
Thanks for point this out, Roger. I'm curious though what your use case is that you're even encountering this. StringRangSet is only used internally by org.bson.types.BasicBSONList#keySet, and it would be unusual to require the keys from a BSON array, since they should be entirely predictable based on the size of the list. |