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

feat: return feature from isEnabled to avoid another lookup #167

Merged
merged 1 commit into from
Dec 15, 2023

Conversation

jameshartig
Copy link
Contributor

About the changes

Previously GetVariant would do 2 storage.Get calls which might be costly depending on the implementation. It doesn't need to do the second one if we just return the feature from isEnabled.

Closes #161

Important files

Discussion points

Previously GetVariant would do 2 storage.Get calls which might be costly
depending on the implementation. It doesn't need to do the second one if we
just return the feature from isEnabled.

Fixes Unleash#161
@FredrikOseberg
Copy link
Contributor

About the changes

Previously GetVariant would do 2 storage.Get calls which might be costly depending on the implementation. It doesn't need to do the second one if we just return the feature from isEnabled.

Closes #161

Important files

Discussion points

I'll take a look at this as soon as I can

Copy link
Contributor

@FredrikOseberg FredrikOseberg left a comment

Choose a reason for hiding this comment

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

LGTM

@FredrikOseberg FredrikOseberg merged commit 9df999e into Unleash:v4 Dec 15, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Avoid fetching feature again in GetVariant
2 participants