Skip to content
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

fix(query-engine-wasm): reduce size of postgres Query Engine after regression #5018

Merged
merged 12 commits into from
Oct 15, 2024

Conversation

jkomyno
Copy link
Contributor

@jkomyno jkomyno commented Oct 14, 2024

This PR fixes a size regression introduced in #5002.
The regex crate is too large, and caused a 236.376KiB gzip size increment for the postgres Query Engine.
The fix was using js_sys::RegExp on Wasm targets.

Closes: #5008.

@jkomyno jkomyno self-assigned this Oct 14, 2024
@jkomyno jkomyno requested a review from a team as a code owner October 14, 2024 15:50
@jkomyno jkomyno requested review from aqrln and removed request for a team October 14, 2024 15:50
@jkomyno jkomyno added this to the 5.21.0 milestone Oct 14, 2024
Copy link
Contributor

github-actions bot commented Oct 14, 2024

WASM Query Engine file Size

Engine This PR Base branch Diff
Postgres 2.063MiB 2.708MiB -659.543KiB
Postgres (gzip) 824.209KiB 1.036MiB -236.623KiB
Mysql 2.034MiB 2.035MiB -639.000B
Mysql (gzip) 812.033KiB 812.539KiB -518.000B
Sqlite 1.929MiB 1.928MiB 796.000B
Sqlite (gzip) 770.619KiB 770.432KiB 191.000B

libs/crosstarget-utils/src/common.rs Outdated Show resolved Hide resolved
libs/crosstarget-utils/src/common.rs Outdated Show resolved Hide resolved
libs/crosstarget-utils/src/common.rs Outdated Show resolved Hide resolved
libs/crosstarget-utils/src/native/regex.rs Show resolved Hide resolved
libs/crosstarget-utils/src/native/regex.rs Outdated Show resolved Hide resolved
libs/crosstarget-utils/src/common.rs Outdated Show resolved Hide resolved
libs/crosstarget-utils/src/native/regex.rs Outdated Show resolved Hide resolved
Copy link
Member

@aqrln aqrln left a comment

Choose a reason for hiding this comment

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

LGTM :shipit:

@aqrln aqrln merged commit 08713a9 into main Oct 15, 2024
366 of 368 checks passed
@aqrln aqrln deleted the fix/regex-size-postgres-wasm branch October 15, 2024 10:24
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.

Avoid regex crate for wasm bundle size (to keep cloudflare free plan)
2 participants