[MONGOCRYPT-137] Optimize cache lookup Created: 08/May/19 Updated: 13/Feb/20 Resolved: 15/Oct/19 |
|
| Status: | Closed |
| Project: | Libmongocrypt |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Kevin Albertson | Assignee: | Unassigned |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
Cache lookup is currently a naive traversal of a linked list. We need to look up in the cache by three things:
We can sort the list by last_updated, but we'd probably need a hash map or similar data structure to have fast lookup by owner_id or attribute. Also consider making the list doubly linked. |