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

Look for ways to speed up quilt option access #57

Open
zachary-foster opened this issue Jun 24, 2015 · 1 comment
Open

Look for ways to speed up quilt option access #57

zachary-foster opened this issue Jun 24, 2015 · 1 comment

Comments

@zachary-foster
Copy link
Contributor

Currently, quilt can be quite slow on large directories; it did not used to be. I think this is because of the new way options values are inferred from config files. Currently, each time a path-specific option is referenced in the code, all the config files in that path are read. It is memoized, but is still slow. Perhaps all of the config files could be read before hand and a data structure containing the option values for each path saved in a function to access option values.

@zachary-foster
Copy link
Contributor Author

I thought of a way to do this:

  1. Make a two dimensional list of every file path under the specified path(s) X every quilt option.
  2. Initialize the list with the default option values
  3. find all configuration files and sort them by file hierarchy depth from path
  4. Apply the effects of each configuration file in order
  5. Apply effects of any options specified in the function call as if they were specified in a configuration file at each path
  6. store the result in a function via a closure that takes the name of an option and one or more paths.

The closure function can then be used to access the path-specific values of options in the rest of the functions.

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

No branches or pull requests

1 participant