timezoneLookup icon indicating copy to clipboard operation
timezoneLookup copied to clipboard

Performance issues

Open ringsaturn opened this issue 2 years ago • 1 comments

Hi,

I wrote a package https://github.com/ringsaturn/tzf and add a benchmark page compard with this repo https://github.com/evanoberholster/timezoneLookup .

Benchmark shows that timezoneLookup which use RTree is slower 20 times compared with tzf which only use point in polygon search algo from https://github.com/tidwall/geojson

The performance seems comfusing because RTree should be faster, is there anything i missed in the benchmark code?

Benchmark repo https://github.com/ringsaturn/tz-benchmark

Bencmark pages https://ringsaturn.github.io/tz-benchmark/

ringsaturn avatar Jul 20 '22 05:07 ringsaturn

Hi,

Thanks for bringing this up. I will have to look a little closer at the code to see if I can find a reason.

I would assume that being backed by a byte array instead of PB and having an Rtree make it faster.

If you find something that might be the culprit, pleas let me know.

evanoberholster avatar Jul 22 '22 05:07 evanoberholster