Added json import and export
Hey, we needed a way to quicker initialize our app. Loading a huge huge csv took to long for every app start. So I added functionality here, so you can once init the kdtree from csv and then in the future always import the indexed json. This proved to be much much faster like 10x than before. I also removed the test data, because it bloated our app size.
Would be great if you merge this, otherwise we will just use it as our own fork. Thanks!
I tried to use your fork with the json way and it is really faster, but it produces a 2.5x bigger .json file than an .csv file. I think that it depends on the use. In my case, it don't be worth it, since the app size gets a lot bigger.
So the best here could be given the option to export/import as json, but also make an better implementation for that GeocodeData constructor, it should use a stream to read the csv and use an isolate to compute that amount of info without freezing the UI.