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

Why not apply this to net/http? #3

Closed
mengzhuo opened this issue Nov 24, 2015 · 6 comments
Closed

Why not apply this to net/http? #3

mengzhuo opened this issue Nov 24, 2015 · 6 comments

Comments

@mengzhuo
Copy link
Contributor

Send Go team as a patch?

@hgfischer
Copy link

👍 👍

@sybrandy
Copy link

Along the same lines, why does this not adhere to the same interface is net/http? Perhaps I misread the documentation, but at least ListenAndServe has a different interface.

@abacaj
Copy link

abacaj commented Nov 24, 2015

I agree, seemed cumbersome to have to assign handlers. I would like it to follow more or less the net/http library like this https://gist.github.com/tristanwietsma/8444cf3cb5a1ac496203

@trivita
Copy link

trivita commented Nov 24, 2015

@sybrandy true, deal breaker

@valyala
Copy link
Owner

valyala commented Nov 28, 2015

  • net/http efficiency will never reach fasthttp due to API constraints and backwards compatibility requirements.
  • fasthttp cannot have API identical to net/http due to performance reasons.

See the FAQ for more information.

@valyala valyala closed this as completed Nov 28, 2015
@valyala
Copy link
Owner

valyala commented Nov 28, 2015

FYI, I tried optimizing net/http before starting fasthttp. About 50% of memory allocations per request were shaved, but this didn't give significant performance gain. So I gave up and started fasthttp :)

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

6 participants