zeke / all-the-cities

🌆 All the 138,398 cities of the world with a population of at least 1000 inhabitants, in a big JSON array.
http://npm.im/all-the-cities
MIT License
280 stars 42 forks source link

Store cities in a compact pbf binary #3

Closed mourner closed 7 years ago

mourner commented 7 years ago

Closes #2.

Size before: 33.6MB, after: 5.3MB. Load time before: 900ms, after: 300ms.

A few breaking changes I did along the way (we could roll back though):

cc @zeke

mourner commented 7 years ago

Also note that we could additionally use zlib for compression, which will bring the size down to 2.5MB and increase load time to 350ms.

zeke commented 7 years ago
❯ np major
 ✔ Prerequisite check
 ✔ Git
 ✔ Cleanup
 ✔ Installing dependencies
 ✔ Running tests
 ✔ Bumping version
 ✔ Publishing package
 ✔ Pushing tags

 all-the-cities 2.0.0 published 🎉
zeke commented 7 years ago

Thanks, @mourner! It's an honor to get a PR from a mapboxer. :)