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

perf: replace querystring with fast-querystring #272

Merged
merged 1 commit into from
Sep 13, 2022

Conversation

anonrig
Copy link
Contributor

@anonrig anonrig commented Sep 9, 2022

Checklist

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Member

@Fdawgs Fdawgs left a comment

Choose a reason for hiding this comment

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

I think we should wait until this is at a stable version (v1.x) before doing this. From the rapid progress @anonrig is making I don't think that's far off!

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

Could you please add an option to configure the querystring module to use? Like in Fastify.

@anonrig
Copy link
Contributor Author

anonrig commented Sep 12, 2022

Fastify was using querystringParser and this package is using stringifier. I thought of querystringStringifier but I'm open to suggestions @Fdawgs & @mcollina

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

Thanks for opening a PR! Can you please add a unit test?

@anonrig
Copy link
Contributor Author

anonrig commented Sep 12, 2022

I removed the last commit, this is actually implemented already @mcollina https://github.com/fastify/fastify-reply-from#querystring-or-querystringsearch-requrl

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm did you check how much this improved perf (if at all)?

@anonrig
Copy link
Contributor Author

anonrig commented Sep 12, 2022

@mcollina I didn't do a benchmark, but fast-querystring.stringify is 20% faster than querystring

@Uzlopak
Copy link
Contributor

Uzlopak commented Sep 13, 2022

Can we decorate fastify with querystring and the plugins consume that instead of clustering the option everywhere?

@anonrig
Copy link
Contributor Author

anonrig commented Sep 13, 2022

@Fdawgs I released 1.0. I think it is stable enough.

@mcollina mcollina merged commit 7f81d33 into fastify:master Sep 13, 2022
@anonrig anonrig deleted the perf/qs branch September 13, 2022 14:38
@Eomm
Copy link
Member

Eomm commented Sep 13, 2022

Do we agree to release it as a minor version?

@anonrig
Copy link
Contributor Author

anonrig commented Sep 13, 2022

It is a non-breaking change, if we are following sem-ver.

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.

5 participants