-
Notifications
You must be signed in to change notification settings - Fork 349
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
Add ability to lockfile to retrieve spec repo for pod name #434
Conversation
633de7d
to
baf0568
Compare
baf0568
to
c80c5cc
Compare
lib/cocoapods-core/lockfile.rb
Outdated
# | ||
def spec_repo(pod_name) | ||
pods_by_spec_repo.detect { |key, values| break key if values.include?(pod_name) } | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be cached/memoized in an internal hash? Since CocoaPods/CocoaPods#7464 will use this in a loop, it will end up traversing several times
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dont think its that much of a problem. The maximum number of times spec_repo
method can be called by CocoaPods library is N where N is the number of pods you have and it means that every single one changed its source for this method to be invoked.
I think N ranges from 1-200 here.
Definitely thanks for bringing up as performance can easily degrade on seemingly small changes :)
Updated to cache the inverted hash |
d9b3aa0
to
f5710a3
Compare
No description provided.