[GODRIVER-1670] Use buffer pooling and copying return values to reduce memory allocation Created: 02/Jul/20 Updated: 28/Oct/23 Resolved: 08/Sep/22 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 1.11.0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Rachelle Palmer | Assignee: | Qingyang Hu |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||||||||||
| Epic Link: | Reduce Allocations | ||||||||||||||||||||||||||||
| Quarter: | FY23Q2, FY23Q3 | ||||||||||||||||||||||||||||
| Case: | (copied to CRM) | ||||||||||||||||||||||||||||
| Description |
|
Currently new byte slices are created every time Operation.Execute is called. We can reduce this by pooling the byte slices in the background and copying return values, which are usually subslices, into new slices before returning them, which will free up the original slice. |
| Comments |
| Comment by Qingyang Hu [ 08/Sep/22 ] |
|
Fixed in GODRIVER-2021 |
| Comment by Isabella Siu (Inactive) [ 05/Mar/21 ] |
|
After some investigation, to expand on Jeff's comment above, which is likely to be be the best way to handle this, Operation.Execute() currently takes in a scratch parameter, ostensibly for setting up pooling in a ticket like this, but because of the way that scratch slice gets passed through the function and into the results means that more would need to change to enable this. |
| Comment by Jeffrey Yemin [ 07/Jul/20 ] |
|
Consider using this ticket as a springboard for:
|