Why new data file so big?
Package| Minified|latest.json
-------|-------|-------
0.5.21 |407.8kB |176kB
0.5.23 | 1.1mB |903kB
Thanks for pointing that out. It was expected, though I didn't anticipate the degree of increase.
With this release, #308 is fixed. That bug was truncating data before certain dates, due to differences in zdump output on various systems. So prior to this release, the "full" versions of the data files weren't actually quite full.
Additionally, if there's even one difference between zones, then our builder won't combine them with links. As such, the "full" version has lots of lines that look like they're new, but simply they were previously combined due to not knowing about earlier data.
The truncated (2012-2022) files still are about the same size, because they are deliberately truncating data for those date ranges. You can build the files yourself if you want specific truncated behavior.
Sorry if this came as a surprise. It's just the nature of correcting this bug.
The new data are 8 times (!) greater. I think, that applications will demand other limited data sets, than the quite short 2012-2022. These numbers I measured with the pure JSON (packed) data. Showing not-minified sizes would be too scary ;-)
Full IANA TZ data: 923 KB minified, 33.3 KB gzipped
Data for 1000-2050: 203 kB minified, 24.9 gzipped
Data for 1650-2050: 203 kB minified, 24.9 gzipped
Data for 1900-2050: 200 KB minified, 23.3 KB gzipped
Data for 1970-2018: 106 KB minified, 13.1 KB gzipped
Data for 2012-2022: 27 KB minified, 6.5 KB gzipped
The huge difference between the full data amd 1000-2050 makes it difficult for me not to doubt, if the limited data are really correct. Isn't the filterLinkPack dropping some "good stuff"? ;-)
const tz = require('./moment-timezone-utils')
const fullData = require('./data/unpacked/2018g.json')
const groupLeaders = require('./tasks/group-leaders.json')
const limitedData = tz.filterLinkPack(fullData, 1900, 2050, groupLeaders)
My biggest concern here is that the file size has frequently updated as a patch release and not a minor/major release. 0.5.13 was 190 KB and now 0.5.23 is 1.4 MB, these are patch releases and you could expect any application to happily update to them - but this leads to a breaking change in the size of the resulting application.
I use a script to build timezone data for custom ranges https://github.com/yurikuzn/moment-timezone-data-build
File size is 123KB for 1970 - 2030 range.
I ended up filtering the dates in the range 1970 - 2030, then replacing the 'indices' and 'untils' data with indexes to an array of values (as a lot of that data is repeated):
https://gist.github.com/Colkadome/7cd3c8111ba13f804908dcb6d06d2dab
I plan to publish a 1970-2030 file in the next release. See comments in #614. Thanks.
This is completed in version 0.5.24. Thanks.
Most helpful comment
I use a script to build timezone data for custom ranges https://github.com/yurikuzn/moment-timezone-data-build
File size is 123KB for 1970 - 2030 range.