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

Request: Smaller library variant #65

Open
tipa opened this issue Sep 5, 2024 · 2 comments
Open

Request: Smaller library variant #65

tipa opened this issue Sep 5, 2024 · 2 comments

Comments

@tipa
Copy link

tipa commented Sep 5, 2024

I am currently using tz-lookup-net but the package and the underlying timezone data hasn't been updated for more than four years, therefore I looked for an alternative and found this project. Unfortunately, it appears like this package is much, much larger in size (over 3 MB vs ~100 KB), likely because the timezone boundaries are more precise.
3 MB is just too large for me to be using it in a mobile app (it would make up 10% of the total app size).

According to tz-lookup-oss (the repo on which tz-lookup-net is based on), they were also using timezone-boundary-builder as source for the timezone data - just like this package - but perhaps with some additional lossy compression, resulting in the much smaller package size.

It would be fantastic if this library could offer something similar. A "GeoTimeZone-Lite" variant that is 40x smaller than the current version would be worth the tradeoff for slightly less accuracy for me

@mattjohnsonpint
Copy link
Owner

This is essentially the same as being discussed in #56, but in the opposite direction.

Personally, I don't think the next size down would lead to useful results. ie, geohash level 4 is ≤ 39.1km X 19.5km in precsion.

There may be other ways to optimize the data size. I'd accept a PR, but I'm not particularly invested in doing the work myself at the moment.

@mattjohnsonpint mattjohnsonpint closed this as not planned Won't fix, can't repro, duplicate, stale Jan 26, 2025
@mattjohnsonpint
Copy link
Owner

I'll leave this open in case anyone wants to send a PR.

Another approach to consider would be to build data using one of the other variants of the source shapefiles. That could shave off a few kb.

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

2 participants