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

feat: enable optionally enabling/disabling blob compression MONGOSH-1759 #58

Merged
merged 1 commit into from
Apr 15, 2024

Conversation

addaleax
Copy link
Contributor

While blobs such as startup snapshots (40MB in the case of mongosh) can be quite large and compressing them saves binary size, decompressing them also costs non-trivial startup time. We make compression optional in this commit so that we can turn it off in mongosh.

While blobs such as startup snapshots (40MB in the case of mongosh) can
be quite large and compressing them saves binary size, decompressing
them also costs non-trivial startup time. We make compression optional
in this commit so that we can turn it off in mongosh.
@addaleax addaleax changed the title feat: enable optionally enabling/disabling blob compression feat: enable optionally enabling/disabling blob compression MONGOSH-1759 Apr 12, 2024
@@ -107,6 +107,21 @@ export function createCppJsStringDefinition (fnName: string, source: string): st
`;
}

export async function createUncompressedBlobDefinition (fnName: string, source: Uint8Array): Promise<string> {

Choose a reason for hiding this comment

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

Does this function need to be async?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, not really :) Just makes it consistent with createCompressedBlobDefinition()

@addaleax addaleax merged commit ac13672 into main Apr 15, 2024
9 of 12 checks passed
@addaleax addaleax deleted the 1759-dev branch April 15, 2024 14:26
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