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

Allow the user to set the copy chunk size through the settings form #20

Open
carolyncaron opened this issue Jul 3, 2018 · 0 comments
Open

Comments

@carolyncaron
Copy link
Member

Currently, the copy chunk size is hard-coded in the API as 10 000 records. The efficiency of the COPY functionality is dependent on choosing an appropriate number of records to copy in at once based on the total number of records being loaded. This can be hard to determine, so the user may want to tweak the size on a test site first. They may also choose the size based on available space on their hard drive for the temporary file that gets copied into the database.

Lacey suggested the following in PR #19 (referring to $copy_chunk_size = 10000; in the API):

I would allow this to be set via variable_get/set().

  1. Change this line to $copy_chunk_size = variable_get('genotypes_loader_cp_chunk_size', 10000);
  2. Set via variable_set() in the first drush function after exposing an option to the user. This way you don't have to worry about trying to pass the value through the chain of functions while still providing a way for your user to change this value per file.
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

2 participants