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 reading of namespaces #342

Merged
merged 3 commits into from Dec 17, 2021
Merged

optimize reading of namespaces #342

merged 3 commits into from Dec 17, 2021

Conversation

jakedt
Copy link
Member

@jakedt jakedt commented Dec 17, 2021

No description provided.

@github-actions github-actions bot added the area/api v1 Affects the v1 API label Dec 17, 2021
@jakedt jakedt added the area/perf Affects performance or scalability label Dec 17, 2021
if found {
return value.(*v0.NamespaceDefinition), nil
}

// We couldn't use the cached entry, load one
loaded, _, err := nsc.delegate.ReadNamespace(ctx, nsName, revision)
loadedRaw, err, _ := nsc.readNsGroup.Do(nsRevisionKey, func() (interface{}, error) {
loaded, _, err := nsc.delegate.ReadNamespace(ctx, nsName, revision)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a span here indicating the read started?

@github-actions github-actions bot added area/CLI Affects the command line area/tooling Affects the dev or user toolchain (e.g. tests, ci, build tools) labels Dec 17, 2021
Copy link
Member

@josephschorr josephschorr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jakedt jakedt merged commit 4d8d76b into main Dec 17, 2021
@jakedt jakedt deleted the optimized-read-ns branch December 17, 2021 23:32
@github-actions github-actions bot locked and limited conversation to collaborators Dec 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/api v1 Affects the v1 API area/CLI Affects the command line area/perf Affects performance or scalability area/tooling Affects the dev or user toolchain (e.g. tests, ci, build tools)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants