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

Close CSVParser properly and switch to record wise parsing to reduce memory use #787

Merged
merged 1 commit into from
Jul 30, 2024

Conversation

seadowg
Copy link
Member

@seadowg seadowg commented Jul 25, 2024

Does what it says on the tin! It seems like the CSV parsing code we had was using a different approach from the one we'd want for low memory (possibly to optimize for speed). It was clear from reading the docs that we were firstly not closing the resource properly, and secondly could be parsing files on a record-by-record basis.

I'd initially been looking to just write up an issue for this, but then realized the changes needed were very small.

I've created a v4.4.x branch for this to merge into as I'm thinking that we could do a hotfix release here and a corresponding one in Collect.

@seadowg seadowg changed the base branch from master to v4.4.x July 25, 2024 07:50
@seadowg seadowg marked this pull request as ready for review July 25, 2024 07:52
@seadowg seadowg requested a review from lognaturel July 25, 2024 07:52
Copy link
Member

@lognaturel lognaturel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good find!

@seadowg seadowg added this to the 4.4.x milestone Jul 30, 2024
@lognaturel lognaturel merged commit 94ac3cd into getodk:v4.4.x Jul 30, 2024
3 checks passed
@seadowg seadowg deleted the streamed-csv branch July 31, 2024 07:25
seadowg added a commit to seadowg/javarosa that referenced this pull request Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: done
Development

Successfully merging this pull request may close these issues.

2 participants