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

micro optimization: do not serialize PLAINTEXT mimetype #1025

Merged
merged 2 commits into from
Aug 17, 2023

Conversation

mikea
Copy link
Collaborator

@mikea mikea commented Aug 17, 2023

mimetype serialization is surprisingly complex and involves heap allocations (kj::strTree). Fix it for simple case while waiting for a proper toString improvement.

mimetype serialization is surprisingly complex and involves
heap allocations (kj::strTree). Fix it for simple case
while waiting for a proper toString improvement.
@mikea mikea requested review from jasnell and fhanau August 17, 2023 16:01
@fhanau
Copy link
Collaborator

fhanau commented Aug 17, 2023

LGTM. There's two more instances of MimeType::PLAINTEXT.toString() in api/kv.c++ and api/http.c++, perhaps that makes less of an impact but can you convert those too?

@mikea mikea force-pushed the maizatskyi/2023-08-17-cache-mime-text branch from 3f43cfd to 9fbf0e1 Compare August 17, 2023 16:54
@mikea mikea merged commit b6a6423 into main Aug 17, 2023
7 checks passed
@mikea mikea deleted the maizatskyi/2023-08-17-cache-mime-text branch August 17, 2023 17:47
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