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

Speed and latency of requests #4925

Closed
Hatsune-Mikun opened this issue Jun 11, 2022 · 9 comments
Closed

Speed and latency of requests #4925

Hatsune-Mikun opened this issue Jun 11, 2022 · 9 comments
Labels

Comments

@Hatsune-Mikun
Copy link

I using express in all my projects, i like syntactics, methods, for ease of use

Lately I've been starting to dig deeper into code optimization and better use of certain things to write efficient code

image

I recently stumbled across this benchmark(you can check it out here with code examples) and I'm quite frustrated by the huge backlog from the Express side. It has an excellent base, it is one of the most requested frameworks, and I do not want and do not intend to switch to alternatives, but this difference really saddens me

May I know what is causing this backlog and will there be any work done on this in the future?

PS I'm not trying to bust a conflict, I'm just interested in the work of my favorite framework, because. upset by a clear speed advantage in other analogues

@dougwilson
Copy link
Contributor

Hi @Hatsune-Mikun the Express project absolutely welcomes any contributions that improve the performance of the framework. I know that I, personally, have been focused on trying to add the many feature requests folks like. It would be amazing if you or someone would dig in to the performance profile of the framework and contribute or guide changes to improve it 👍

@Hatsune-Mikun
Copy link
Author

To my regret, I am an ordinary programmer who makes libraries, tools and applications using existing auxiliary ones, like the same Express, instead of writing in bare http, which I understand well, therefore, even with all my desire, I will not be able to contribute to such a huge project, but I sincerely empathize with its fate, because in terms of convenience, this is the best framework, but the performance leaves much to be desired
Of course, from personal experience, I don’t feel such problems yet, but these large numbers of the difference upset me :c

@dougwilson
Copy link
Contributor

Hi, I am very sorry about that. Perhaps would you be willing to sponsor someone instead for their time and effort to improve it? That would be the maij alternative qith open source projects if you're unable to contribute towards the code itself.

@Hatsune-Mikun
Copy link
Author

Sounds like a good idea
One day I will actually do it, in gratitude for the fact that you gave me the opportunity to make my applications
Thank you

@abenhamdine
Copy link
Contributor

abenhamdine commented Jun 15, 2022

I recently stumbled across this benchmark(you can check it out here with code examples) and I'm quite frustrated by the huge backlog from the Express side. It has an excellent base, it is one of the most requested frameworks, and I do not want and do not intend to switch to alternatives, but this difference really saddens me

It's just a "hello word" benchmark.
I warn you strongly against this kind of benchmarks.
Everyone on the web/github is claiming to be "blazing fast" but it's generally only true (if it's true) under some particular conditions .
Last time I checked that benchmark, and tried to reproduce the results with a more realistic payload, I was totally unable to see any difference between fastify and express. Actually in our use case (large payload), Express was even slightly faster.

So before making any decision (eg switching framework..), I would recommend to run the benchmarks on your use case.

@Hatsune-Mikun
Copy link
Author

@abenhamdine

So before maing any decision (eg switching framework..), I would recommend to run the benchmarks on your use case.

I am very grateful to you for this answer, and your opinion agreed with what I was thinking about in my head

You said that you have already done tests on more complex operations, can you do them again and send them here in a resultant form?

@abenhamdine
Copy link
Contributor

abenhamdine commented Jun 15, 2022

see fastify/benchmarks#3
there's a link to my benchmark code IIRC

actually in https://github.com/fastify/benchmarks home page, you can even see that Fastify is officially slower than express on big payloads :

image

@abenhamdine
Copy link
Contributor

abenhamdine commented Jun 15, 2022

If you need high performance on some routes, I suggest to give a try to https://github.com/uNetworking/uWebSockets.js
Because, as an exception, his performance claims are true (we have benchmarked it and use it in production for millions requests daily).

@Hatsune-Mikun
Copy link
Author

@abenhamdine, @dougwilson
Thank you, it was a valuable review, I think this trend can be closed

I'm glad that I can continue to write in my comfortable framework without worrying about such an important aspect.
Thanks for taking the time for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants