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

Refactor cleancalaccessrawfile to use lower-level command-line tools or other methods that are faster than the current slow Python loop through each file #1184

Open
palewire opened this issue Jan 22, 2016 · 3 comments

Comments

@palewire
Copy link
Owner

No description provided.

@palewire palewire changed the title Can cleancalaccessrawdata be refactored to use lower-level command-line tools rather than rely on a slow Python loop through each file? Refactor cleancalaccessrawdata to use lower-level command-line tools or other methods that are faster than the current slow Python loop through each file Mar 4, 2016
@palewire palewire changed the title Refactor cleancalaccessrawdata to use lower-level command-line tools or other methods that are faster than the current slow Python loop through each file Refactor cleancalaccessrawfile to use lower-level command-line tools or other methods that are faster than the current slow Python loop through each file Mar 4, 2016
@palewire palewire added this to the California Code Rush 4 milestone Mar 4, 2016
@palewire palewire added small and removed large labels Mar 7, 2016
@martinburch
Copy link
Contributor

Could you point me to the slow loop that's involved here? Is it clean() being invoked at https://github.com/california-civic-data-coalition/django-calaccess-raw-data/blob/master/calaccess_raw/management/commands/cleancalaccessrawfile.py#L75 ?

@gordonje
Copy link
Collaborator

Line 126 in cleancalaccessrawfile.py is where we start looping over each line in a given .tsv file.

Line 285 in updatecalaccessrawdata.py is where we loop over each .tsv file, calling the above management command.

Either of these what you are looking for @martinburch?

@martinburch
Copy link
Contributor

Yes, I think the line iteration in cleancalaccessrawfile.py is where we can try applying the multiprocessing imap as discussed in slack.

@palewire palewire added large and removed small labels Aug 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants