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 #129

Merged
merged 1 commit into from
Sep 18, 2022

Conversation

anonrig
Copy link
Contributor

@anonrig anonrig commented Sep 9, 2022

Checklist

package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
@anonrig
Copy link
Contributor Author

anonrig commented Sep 9, 2022

The following two separate tests are only required to be tested with fast-querystring, since fast-querystring does not support additional parameters, and does not apply for fastify-formbody use case.

Here's the link where we put all the node tests: https://github.com/anonrig/fast-querystring/blob/b893058f36c2c1db615d6f238a70d696526ff7af/test/node.ts.

The tests extracted from querystring module that makes sense for stringify

The tests extract from querystring module that makes sense for parse

@anonrig
Copy link
Contributor Author

anonrig commented Sep 9, 2022

@jsumners I forced pushed to include 0.7.1 version where I added more & more tests. It has all the tests on the node.js side, and more taken from several other packages. The code coverage is 98% at the moment.

@jsumners
Copy link
Member

I have tried to find a comprehensive test suite for URL search params (https://url.spec.whatwg.org/#urlsearchparams) in both the Firefox and Chromium codebases, but I was unsuccessful. It really seems like there should be a standardized set of strings that implementors can test their code against 😕

I would still rather any direct dependency be mature enough that it is willing to publish itself as v1.0.0.

@kibertoad
Copy link
Member

@anonrig what is left on library side until you are comfortable with publishing 1.0.0?

@Uzlopak
Copy link
Contributor

Uzlopak commented Sep 10, 2022

Can we have fast-querystring in the fastify org?
We are not using package-lock.json so we would not see if there are malicious changes. Not saying that anonrig is malicious but thats my only worry as we are basically the first users.

One of the reasons I removed some simple packages from our repos was to reduce the surface for supply chain attacks.

@Uzlopak
Copy link
Contributor

Uzlopak commented Sep 10, 2022

@Fdawgs
@mcollina

We are currently discussing it here

@jsumners
Copy link
Member

Can we have fast-querystring in the fastify org?

We are not using package-lock.json so we would not see if there are malicious changes. Not saying that anonrig is malicious but thats my only worry as we are basically the first users.

One of the reasons I removed some simple packages from our repos was to reduce the surface for supply chain attacks.

This is unnecessary. The Fastify org does not need to maintain every library.

@Uzlopak
Copy link
Contributor

Uzlopak commented Sep 10, 2022

I made my arguments.

@mcollina
Copy link
Member

A few notes. I'm happy with the fast-querystring module and I also have the publish bit in there.

I asked @anonrig immediately if he could move it to the org, however, he said he would prefer to keep it under his name.

Given that the module is a few days old, let's wait until it's 1.0.0 and then make some decision?

In the meanwhile, would you mind adding an option to configure the querystring module, like it's present in Fastify?

@anonrig
Copy link
Contributor Author

anonrig commented Sep 12, 2022

Sorry for the late reply. I was getting my basic keelboat training in the weekend 🎉

@anonrig what is left on library side until you are comfortable with publishing 1.0.0?

@kibertoad Honestly speaking, nothing. I'm just waiting for a couple of days, where I can't find any more performance improvement.

Can we have fast-querystring in the fastify org? We are not using package-lock.json so we would not see if there are malicious changes. Not saying that anonrig is malicious but thats my only worry as we are basically the first users.

@Uzlopak I've given @mcollina both NPM and Github rights, in case I'm not available to release any changes. If package.json includes a fixed version, this will be averted.

In the meanwhile, would you mind adding an option to configure the querystring module, like it's present in Fastify?

@mcollina I'll update the pull request.

@anonrig
Copy link
Contributor Author

anonrig commented Sep 12, 2022

Fix: Actually fastify-formbody already supports parser as a parameter of opts.

@anonrig
Copy link
Contributor Author

anonrig commented Sep 13, 2022

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

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

@Fdawgs Fdawgs requested a review from jsumners September 15, 2022 11:01
@mcollina
Copy link
Member

@jsumners PTAL, are you still blocking this?

@jsumners
Copy link
Member

@jsumners PTAL, are you still blocking this?

I was at my company "offsite".

@kibertoad kibertoad merged commit c7c150d into fastify:master Sep 18, 2022
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.

6 participants