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

improve performance #1

Open
matryer opened this issue Oct 5, 2016 · 13 comments
Open

improve performance #1

matryer opened this issue Oct 5, 2016 · 13 comments
Assignees

Comments

@matryer
Copy link
Owner

matryer commented Oct 5, 2016

@dahernan talked about a way to make this way quicker (using radix trees) -- Let's do it.

@ole108 ole108 self-assigned this May 19, 2017
@matryer
Copy link
Owner Author

matryer commented Aug 21, 2017

@ole108 How are you getting on with this?

@ole108
Copy link
Collaborator

ole108 commented Sep 18, 2017

@matryer Sorry Mat but I got a bit stuck with it.
I tried first to take httptreemux (it already has got many of the nice things we want and the original from Julien Schmidt doesn't got) and cut code from there and paste it into way. Unfortunately it was quite impossible to make ends meet.

Then I forked httptreemux instead and tried to refactor it until the interface would match. But I got stuck there, too.

A month ago I started a new job and consequently don't have got much time for it now.
I suppose one would have to only look at code from other routers but shouldn't try to copy much.
I really hoped it would be much easier.

@matryer
Copy link
Owner Author

matryer commented Sep 18, 2017 via email

@awulkan
Copy link

awulkan commented Oct 14, 2018

Sorry for resurrecting an old issue, but does anyone have a benchmark of the current state of the router? How bad/good is the performance right now?

@matryer
Copy link
Owner Author

matryer commented Oct 14, 2018 via email

@awulkan
Copy link

awulkan commented Oct 14, 2018

Yes, I totally understand that routing performance isn't the most time consuming part in applications. I was mainly asking since you brought it up in this issue. I'm new to Go, but it would be an interesting project for me to maybe work on. :)

Also, thanks for the quick response.

@matryer
Copy link
Owner Author

matryer commented Oct 29, 2018

Well if you fancy having a look, the idea is to build a version of this that uses a radix tree for lookups. And benchmark it to see what difference it makes. Purely academic exercise though :)

@awulkan
Copy link

awulkan commented Oct 29, 2018

@matryer Ye, I'm already kinda done. :)
I started with this project as a base, but pretty much ended up rewriting everything. Still working on it, but so far the performance is pretty good. The only thing that appears to lower the performance is when assigning parameters to the context.

Unfortunately I don't think it would be a good idea to merge my code with this project since it's so different. I mean, it looks just like your router from a user's perspective, but the router's code is almost fully replaced with my own.

I might post it on github someday if anyone is interested.

@ole-optiopay
Copy link

@matryer @awulkan IMHO this is the only way.
As long as the API stays the same and the new code isn't too complex it should be fine.
I once tried to solve this issue with smaller changes but it didn't add up...

@ofabricio
Copy link

ofabricio commented Mar 10, 2019

this might be useful

@BackAged
Copy link

BackAged commented Apr 3, 2019

is someone still working on improve performance?

@davidmdm
Copy link

pinging for visibility. Is there still interest in adding a radix tree implementation to way?

@davidmdm
Copy link

@matryer ? Any interest?

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

No branches or pull requests

8 participants