[SERVER-45216] Rename Document::size() to Document::computeSize Created: 17/Dec/19 Updated: 29/Oct/23 Resolved: 20/Feb/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | None |
| Fix Version/s: | 4.3.4 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Ian Boros | Assignee: | Svilen Mihaylov (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | neweng, qexec-team | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Sprint: | Query 2020-02-24 |
| Participants: |
| Description |
|
Document::size() takes linear time. Most people (including me) expect a size() function to be constant time. We should rename this method.
|
| Comments |
| Comment by Githook User [ 20/Feb/20 ] |
|
Author: {'username': 'smihaylov-mongodb', 'name': 'Svilen Mihaylov', 'email': 'svilen.mihaylov@mongodb.com'}Message: |
| Comment by Ian Boros [ 17/Dec/19 ] |
|
Today I found a workload where roughly 20% of the time is being spent in Document::size() because we assumed it was cheap to call. |