Open stgleb opened 7 years ago
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.
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 .
Have you shown this to the 51degrees team? If not, I'm happy to pass this along to them.
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
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.