Tz World version 2.1.0
Tz_World v2.1.0
Enhancements
THe primary focus in this release is peak memory used during the mix tz_world.update process. With the changes in this release, peak memory has been reduced from about 920Mb to about 70Mb.
-
On-disk data format upgraded; existing installations must run
mix tz_world.updateonce after upgrading. -
The :jason dependency has been removed in favour of the built-in :json module (with :json_polyfill on OTP < 27)."
Tz_World v2.0.0
Enhancements
-
Adds
TzWorld.Backend.SpatialIndex, a new backend that resolves timezones using a pure-Elixir R-tree (Sort-Tile-Recursive packed) held in:persistent_term. Lookups bypass the GenServer mailbox and read directly from:persistent_term, eliminating the linear bounding-box scan used by the previous backends. -
TzWorld.Backend.SpatialIndexis now the default backend, and is the first entry in the default backend precedence list. Existing applications that do not pin:default_backendwill pick it up automatically. -
Benchmarked against the previous backends across a categorised fixture set (dense regions, sparse/large zones, small/thin zones, ocean points with no match, points adjacent to the international date line):
Input category Speedup vs. the next-fastest existing backend ocean(no-match)18.2× sparse_or_large1.64× dense(cities)1.43× random uniform 1.42× small_or_thin1.08× The largest wins are on no-match queries: previously, points in the open ocean caused a full scan of every shape's bounding box; the R-tree exits at the root.
-
Adds
TzWorld.SpatialIndex, a small standalone R-tree implementation (build + stab) used by the new backend. -
Adds
TzWorld.TimezoneFixtures, a categorised set of coordinate fixtures used by both the test suite and the benchmark.
Breaking Changes
-
Removes
TzWorld.Backend.Memory. It is strictly dominated byTzWorld.Backend.SpatialIndexon every measured workload (same memory profile, faster lookups, no GenServer round-trip). -
Removes
TzWorld.Backend.Ets. Without an in-memory bbox index, every lookup on a no-match point performed a full ETS scan via match-spec — orders of magnitude slower than the index-cache variant or the newSpatialIndexbackend.TzWorld.Backend.EtsWithIndexCacheremains for users who want ETS-backed shape storage. -
Removes
TzWorld.Backend.Dets. Same reasoning asBackend.Ets.TzWorld.Backend.DetsWithIndexCacheremains for users who want disk-backed shape storage.