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

Optimize ResourceList.Find to use map instead of list #8988

Open
sam-heilbron opened this issue Dec 15, 2023 · 1 comment
Open

Optimize ResourceList.Find to use map instead of list #8988

sam-heilbron opened this issue Dec 15, 2023 · 1 comment
Labels
Area: Translation no stalebot This issue won't be closed by stalebot even after inactivity. release/1.17 Type: Enhancement New feature or request

Comments

@sam-heilbron
Copy link
Contributor

Gloo Edge Product

Open Source

Gloo Edge Version

1.17

Is your feature request related to a problem? Please describe.

When the scale of resources that are being managed by the Control-Plane grows, the performance of the translation loop degrades. One way to handle a higher cardinality of resources, is by relying on lists of resources which are indexed once at the beginning of the translation loop.

At the moment, you can see https://github.com/solo-io/gloo/blob/main/projects/gloo/pkg/api/v1/upstream.sk.go#L71 as an example: we iterate over the resources each time we need to Find an element.

Describe the solution you'd like

  • Index once at the beginning of translation, or lazily the first time that a resource is requested
  • Measure the performance impact before and after
  • Identify if there are situations where relying on a list is actually better than a map
  • Confirm that translation is idempotent and ordering doesn't become a problem since maps don't guarantee order constraints

Describe alternatives you've considered

No response

Additional Context

Identical request to: solo-io/solo-kit#521

Copy link

This issue has been marked as stale because of no activity in the last 180 days. It will be closed in the next 180 days unless it is tagged "no stalebot" or other activity occurs.

@github-actions github-actions bot added the stale Issues that are stale. These will not be prioritized without further engagement on the issue. label Jun 23, 2024
@sam-heilbron sam-heilbron added no stalebot This issue won't be closed by stalebot even after inactivity. and removed stale Issues that are stale. These will not be prioritized without further engagement on the issue. labels Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Translation no stalebot This issue won't be closed by stalebot even after inactivity. release/1.17 Type: Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants