question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

timezonefinder vs timezonefinderL

See original GitHub issue

I am trying to understand the implications of using one vs the other, and have a few questions:

  1. With memory mode = false, wouldn’t using timezonefinderL be equivalent to using timezonefinder’s timezone_at, in terms of speed and memory load? Since that function supposedly uses only shortcuts, same as timezonefinderL.

  2. Wouldn’t it be possible to provide a “limited” memory mode that only loads shortcuts for timezonefinder, to get the best of both world: fast lookups in most cases, and the option to do a deeper lookup when the tz returned is None.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jannikmicommented, Nov 20, 2019

thanks for the valuable feedback and suggestions. I’ll work on this as soon as possible.

TODO:

  • add option to only load shortcuts
  • load shortcuts into memory by default, introduction of flag?
  • timezonefinder L deprecate
0reactions
zedrdavecommented, Nov 20, 2019

Regarding my use case (but I think the above feature would be beneficial to most users regardless of use case): I need TZ data for map points mainly located on sea (used in mapping routes for boats).

In terms of speed/memory/disk use/accuracy trade-off, I would say my ideal workflow (and what I would suggest to implement as a sensible default for the package) would be:

  1. Full binary files that include oceans (considering the fairly low disk/RAM gain from excluding them)

  2. Shortcut files with perhaps a bit more precision (eg doubled): still a much smaller RAM footprint over the full polygon files, with a much better chance of hitting a shortcut without needing polygons (especially in ocean areas, where timezone areas tend to be much straighter)

  3. Only shortcut files are loaded into memory, leading to very fast / low RAM footprint lookups for the majority of points.

  4. Polygon files are only used, for the small number of points that can’t be resolved through shortcuts (if I got it right, you aren’t loading the whole file into memory to do the lookups, but use a file cursor instead, correct?).

Read more comments on GitHub >

github_iconTop Results From Across the Web

jannikmi/timezonefinderL - GitHub
timezonefinderL is the faster and lightweight, but inaccurate version of the original timezonefinder. Use this package in favour of timezonefinder when ...
Read more >
Usage — timezonefinder /bin/sh: 1: poetry - Read the Docs
TimezoneFinderL is a light version of the TimezoneFinder class. It is useful for quickly suggesting probable timezones without using as many computational ...
Read more >
timezonefinderL - PyDigger
Python library to look up timezone from coordinates offline. Light version of "timezonefinder". upload_time, 2017-04-08 10:36:52. maintainer. docs_url, None.
Read more >
Get Time Zone of a Given Location using Python
It contains well written, well thought and well explained computer ... The Timezonefinder module is able to find the timezone of any point...
Read more >
Python Examples of timezonefinder ... - ProgramCreek.com
The following are 4 code examples of timezonefinder.TimezoneFinder(). You can vote up the ones you like or vote down the ones you don't...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found