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

Pure go implementation #2

Open
stgleb opened this issue Jul 26, 2017 · 4 comments
Open

Pure go implementation #2

stgleb opened this issue Jul 26, 2017 · 4 comments

Comments

@stgleb
Copy link

stgleb commented Jul 26, 2017

Is there any plans to write pure go implementation? We use 51 degrees, but after profiling I've found that it takes 20% of request processing time in CGO call.

@elubow
Copy link

elubow commented Jul 27, 2017

I probably won't be doing this. But 51 degrees now has a SWIG implementation which does offer increased performance. I suggest taking a look at that. That's what I implemented in my production app. I just left this up because I know there are still some people using it.

@stgleb
Copy link
Author

stgleb commented Aug 1, 2017

SWIG? We have tried trie implementation, but in my benchmarks it works even worse. But the main problem is in CGO calls that consumes to much of resources for creating new thread. If you are interested you can look https://github.com/stgleb/benchmark_51degrees .

@elubow
Copy link

elubow commented Aug 3, 2017

Have you shown this to the 51degrees team? If not, I'm happy to pass this along to them.

@Joseph51D
Copy link

Hi @stgleb

The Go implementation of 51Degrees uses Swig to wrap the exisiting C library. You can find the wrapper in the 51Degrees/Device-Detection:go-beta repository.

Joe

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

3 participants