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

Revert "improve encodeBase64Url performance (#2774)" #2776

Merged
merged 1 commit into from
Sep 23, 2024

Conversation

anonrig
Copy link
Member

@anonrig anonrig commented Sep 23, 2024

This reverts commit b3d98e0.

I'll follow up on a different PR to fix edgeworker related tests.

@anonrig anonrig requested review from a team as code owners September 23, 2024 22:40
auto actual_length = simdutf::binary_to_base64(
bytes.asChars().begin(), bytes.size(), output.asChars().begin(), simdutf::base64_url);
KJ_ASSERT(expected_length == actual_length);
return kj::String(kj::mv(output));
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems likely this might be the issue? I think kj::String has an internal assert to require that any string pointer content be null-terminated. Might be able to fix it by allocating a slightly bigger array and adding the terminator before passing to kj::String.

Copy link
Member Author

Choose a reason for hiding this comment

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

You're absolutely right. Yes, I'll follow up in a new pull-request to fix this. Let's fix edgeworker first!

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks!

@anonrig anonrig merged commit ba8a592 into main Sep 23, 2024
14 checks passed
@anonrig anonrig deleted the yagiz/revert-encode-base64 branch September 23, 2024 22:45
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.

4 participants