Skip to content

Added json import and export#9

Open
David-Prelinger wants to merge 3 commits intoJankoLancer:masterfrom
David-Prelinger:master
Open

Added json import and export#9
David-Prelinger wants to merge 3 commits intoJankoLancer:masterfrom
David-Prelinger:master

Conversation

@David-Prelinger
Copy link

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!

@LucazzP
Copy link

LucazzP commented Jun 18, 2024

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.

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

Successfully merging this pull request may close these issues.

2 participants