-
Notifications
You must be signed in to change notification settings - Fork 279
feat: extensions schema entrypoint #5626
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
CodSpeed Performance ReportMerging #5626 will not alter performanceComparing Summary
|
WASM Query Engine File Size
WASM Query Compiler File Size
|
schema-engine/core/src/extensions.rs
Outdated
|
||
fn get_by_db_name_and_modifiers(&self, name: &str, modifiers: Option<&[String]>) -> Option<ExtensionTypeEntry<'_>> { | ||
self.by_db_name_and_modifiers | ||
.get(&(name.to_string(), modifiers.map(|m| m.to_vec()))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we get rid of these allocations if we changed the representation from HashMap<(String, Option<Vec<String>>), usize>
to something like HashMap<String, HashMap<Vec<String>, usize>>
? Do we need to differentiate between None
and an empty vec?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could be worth switching to hashbrown and their Equivalent trait to avoid allocations in this function entirely
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to differentiate between None and an empty vec?
In this implementation I do, they mean different things, but we don't actually plan to support that, it's just a leftover from my initial implementation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
TML-1411