Skip to content

Conversation

jacek-prisma
Copy link
Contributor

@jacek-prisma jacek-prisma commented Oct 2, 2025

Copy link

codspeed-hq bot commented Oct 2, 2025

CodSpeed Performance Report

Merging #5626 will not alter performance

Comparing feat/extensions-schema-entrypoint-cherry-pick (ba34a10) with main (c93d14b)

Summary

✅ 11 untouched

Copy link
Contributor

github-actions bot commented Oct 2, 2025

WASM Query Engine File Size

Engine This PR Base branch Diff
Postgres 2.190MiB 2.190MiB 0.000B
Postgres (gzip) 867.693KiB 867.693KiB 0.000B
Mysql 2.158MiB 2.158MiB 0.000B
Mysql (gzip) 854.538KiB 854.537KiB 1.000B
Sqlite 2.071MiB 2.071MiB 0.000B
Sqlite (gzip) 820.218KiB 820.217KiB 1.000B
SQL Server 2.129MiB 2.129MiB 0.000B
SQL Server (gzip) 845.434KiB 845.433KiB 1.000B
CockroachDB 2.213MiB 2.213MiB 0.000B
CockroachDB (gzip) 876.956KiB 876.956KiB 0.000B

WASM Query Compiler File Size

Engine This PR Base branch Diff
Postgres 1.858MiB 1.858MiB 0.000B
Postgres (gzip) 733.707KiB 733.707KiB 0.000B
Mysql 1.824MiB 1.824MiB 0.000B
Mysql (gzip) 721.944KiB 721.944KiB 0.000B
Sqlite 1.782MiB 1.782MiB 0.000B
Sqlite (gzip) 704.457KiB 704.457KiB 0.000B
SQL Server 1.855MiB 1.855MiB 0.000B
SQL Server (gzip) 735.287KiB 735.287KiB 0.000B
CockroachDB 1.883MiB 1.883MiB 0.000B
CockroachDB (gzip) 743.550KiB 743.550KiB 0.000B


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())))
Copy link
Member

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?

Copy link
Contributor Author

@jacek-prisma jacek-prisma Oct 2, 2025

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

Copy link
Contributor Author

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

@jacek-prisma jacek-prisma requested a review from aqrln October 2, 2025 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants