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

Fastify benchmark lists this package as a performance killer #47

Open
brandonros opened this issue May 1, 2018 · 2 comments
Open

Fastify benchmark lists this package as a performance killer #47

brandonros opened this issue May 1, 2018 · 2 comments

Comments

@brandonros
Copy link

https://github.com/fastify/fastify

Framework Version Router? Requests/sec
micro (microrouter) 9.1.0 ([email protected] ) 18,314
micro 9.1.0 31,793

Is this out of date or accurate? Can anything be done to make this package not be a performance killer?

@ilionic
Copy link

ilionic commented Jun 4, 2018

Also interested in this subject. My wild guess culprit could be url / url-pattern as it's relying on some [slow] regex.

@ilionic
Copy link

ilionic commented Jun 4, 2018

Tried https://github.com/petkaantonov/urlparser
Some benchmarks:

With node url:

 Both are awesome but micro is 67.92% faster than microrouter
 • micro request average is 13524
 • microrouter request average is 8054
✨  Done in 4.86s.

With fast-url-parser:

 Both are awesome but micro is 51.92% faster than microrouter
 • micro request average is 14260
 • microrouter request average is 9386.4
✨  Done in 3.48s.

So there are some improvements as you can see. I can send PR
( using fastify benchmarks https://github.com/fastify/benchmarks )

Looks like should be possible to boost more performance refactoring url-pattern

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

No branches or pull requests

2 participants