-
Notifications
You must be signed in to change notification settings - Fork 933
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
cf service-access performance #483
Conversation
- Get all service offerings in one request instead of a request per broker [#96912380]
- Get all service plans in one request instead of a request per service offering [#96912380]
- To map org guids to org names, we make individual requests for each org instead of requesting all orgs. - This is optimized for the case where there are fewer orgs associated with service_plan_visibilities than the total number of org pages. This seemed to be the case on all environments we checked. - /v2/organizations does not support filtering on a list of org or service_plan_visiblility guids, so we have to make separate GETs - In plan_builder, there are package variables that are used to memoize maps. This causes pollution plan_builder tests, so we nil them in test setup [#96912380]
Hey Gerg! Thanks for submitting this pull request! I'm here to inform the recipients of the pull request that you've already signed the CLA. |
We have created an issue in Pivotal Tracker to manage this. You can view the current status of your issue at: https://www.pivotaltracker.com/story/show/97344958. |
@@ -43,6 +44,22 @@ func (repo CloudControllerServicePlanRepository) Update(servicePlan models.Servi | |||
return repo.gateway.UpdateResource(repo.config.ApiEndpoint(), url, strings.NewReader(body)) | |||
} | |||
|
|||
func (repo CloudControllerServicePlanRepository) ListPlansFromManyServices(serviceGuids []string) (plans []models.ServicePlanFields, err error) { |
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.
We try to avoid using inline return variable declarations (like plans and err are here) because it can be hella confusing. Would you guys be ok with changing this to just have a generic return types and then declare plans in the function?
Hey guys, just had a few stylistic issues. We try to shy away from inline declaration of return variables because it can be hard to parse. |
Your word is my command. |
- And return them by name
We fixed the style issues. |
improve cf service-access performance
To improve performance of the
service access
command we changed the way that we:Each change has its own commit with further details in the commit message. Let us know if you have any questions about our changes.
Tracker Story: https://www.pivotaltracker.com/story/show/96912380