Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/import export with large files #16

Merged
merged 10 commits into from
Jun 21, 2019

Conversation

lvancraen
Copy link
Contributor

@lvancraen lvancraen commented Jun 20, 2019

Issue:

Large files aren't able to be stored in memory.

Fix:

Issue

Import: I chunkate the files into 5mb strings so as to parse by chunk instead of the whole file.

Export: I append by row instead of writing the entire file at once.

Notes:

Both of these ways of importing/exporting were used in previous versions of gtfsNodeLib before version 3.5.1 except they used our internal csv parser. So, I reverted back to these old ways except I slightly modified them to use PapaParse.

To think about:

  • Variation on chunk size

@lvancraen lvancraen force-pushed the fix/import_export_with_large_files branch 2 times, most recently from 438fe7b to 3f54cbd Compare June 21, 2019 09:47
lvancraen added 3 commits June 21, 2019 11:49
commented out or else tests takes very long. And unable to push a file larger than 100mb to Github
@lvancraen lvancraen force-pushed the fix/import_export_with_large_files branch from 3f54cbd to 37e3a55 Compare June 21, 2019 09:49
helpers/export.js Outdated Show resolved Hide resolved
helpers/import.js Outdated Show resolved Hide resolved
Co-Authored-By: ilias bhallil <ilias.bhal@gmail.com>
helpers/import.js Outdated Show resolved Hide resolved
lvancraen and others added 2 commits June 21, 2019 14:29
@lvancraen lvancraen requested a review from iliasbhal June 21, 2019 12:58
@lvancraen lvancraen merged commit 7054a62 into master Jun 21, 2019
@lvancraen lvancraen deleted the fix/import_export_with_large_files branch June 21, 2019 15:02
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.

3 participants