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

Make Source#search work optimally again. #182

Closed
alloy opened this issue Oct 6, 2014 · 0 comments · Fixed by #184
Closed

Make Source#search work optimally again. #182

alloy opened this issue Oct 6, 2014 · 0 comments · Fixed by #184

Comments

@alloy
Copy link
Member

alloy commented Oct 6, 2014

This should be part of the removal of source providers other than the file-system one, but I couldn’t find the ticket for that discussion, if it existed at all.

Specifically the Source#search method should not load all of the available pods, because this does not scale at all. The idea of using the file-system as a database is that we can know where that spec should be in the repo, if it exists, and verify it exists with only 1 lookup.

i.e. currently it does (pseudo code):

def search(name)
  all_pods_available_in_spec_repo.find { |pod_name| pod_name == name }
end

Whereas it should work like:

def search(name)
  File.exist?(File.join(spec_repo, name))
end

/cc @segiddins @fabiopelosin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant