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

Let me introduce how to improve performance easily. #855

Closed
ifsnow opened this issue Nov 17, 2016 · 6 comments
Closed

Let me introduce how to improve performance easily. #855

ifsnow opened this issue Nov 17, 2016 · 6 comments

Comments

@ifsnow
Copy link

ifsnow commented Nov 17, 2016

koa's concept is really terrific.

I'm sure koa v2 + async/await will be the mainstream in the future.
but, I guess someone needs to use koa v1 for various reasons.

co-booster is a performance tuning version of co.
It's fully compatible with co. and, works fastly in many cases.

co is used in a core logic of koa v1 and koa-convert.
so, I believe it makes koa better without much effort.

Here are my results using koa's benchmark script. (100 middlewares)

- koa v1 + nodejs v4.4.7 : 11% better
- koa v1 + nodejs v6.9.1 : 13% better
- koa v2(legacy middleware) + nodejs v4.4.7 : 13% better
- koa v2(legacy middleware) + nodejs v6.9.1 : 14% better

I just wondered what author, contributors, and users think about.
I'd like to contribute to koa if I have a chance.

@juliangruber
Copy link
Contributor

The numbers look good! Since co-booster is fully compatible with co however, what do you think about merging your changes into co instead?

@fengmk2
Copy link
Member

fengmk2 commented Nov 17, 2016

Look good, I think co-booster and co merge together will be good choice for the whole co solution.

@ifsnow
Copy link
Author

ifsnow commented Nov 17, 2016

I agree to merging co-booster into co. It depends on the decision of co's maintainers. because it can be a module that is not mature yet.

I tried a lot to confirm about the compatibility and performance. but, I think it should be checked more thoroughly because co is used by many projects.

@marvinhagemeister
Copy link

@ifsnow Thats awesome, great work! I'm sure the people over at co can help with testing and validating the performance. One way to start the discussion would be to open a PR there 👍

@ifsnow
Copy link
Author

ifsnow commented Nov 18, 2016

@marvinhagemeister I'm so flattered. opened a PR in co. I hope it will pay off.

@jonathanong
Copy link
Member

yes, you can make PRs to co. koa just uses that library, so you'll have to push changes there.

however, long term, we are using native await, so i'm not really interested in improving performance with generators.

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

5 participants