[db] Don't collect as many intermediate data structures when looking up [a v] pairs #117
Labels
No labels
A-build
A-cli
A-core
A-design
A-edn
A-ffi
A-query
A-sdk
A-sdk-android
A-sdk-ios
A-sync
A-transact
A-views
A-vocab
P-Android
P-desktop
P-iOS
bug
correctness
dependencies
dev-ergonomics
discussion
documentation
duplicate
enhancement
enquiry
good first bug
good first issue
help wanted
hygiene
in progress
invalid
question
ready
size
speed
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: greg/mentat#117
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This is follow-up to https://github.com/mozilla/mentat/pull/214#discussion_r99386958.
What's happening is that we have a map
[a v] -> e
expressed as a composition of maps:[a v]
-> temporary search ide
entid from databaseThe latter map must be chunked into a number of sub-queries because SQLite allows to bind only a limited number of variables.
The reviewer correctly points out that we don't need to collect as many intermediate data structures. We could do this as iteration and a mutable map, although I think I prefer a big
fold
. A "fold-in-place" is best expressed as afor
loop in Rust (per the documentation), which is what the reviewer asks for.This ticket isn't quite ready, because the [a v] lookup code is likely to change a little with #184.