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

Allocation cleanup #508

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Allocation cleanup #508

wants to merge 4 commits into from

Conversation

rossgrambo
Copy link
Contributor

Why this PR?

We noticed we were allocating a lot of memory in v4 compared to v3. This PR resolves many instances of extra allocations or memory and resolves some issues that existed in v3 as well.

Now- the allocations are just the EvaluationEvent object (which could be improved more for the boolean and missing defintion case), async closures, and enumerators only when needed.

Additionally-

  • Resolves some spelling issues
  • Adds a pull request template
  • Bumps vulnerable packages in examples and test projects

Visible Changes

No changes are visible to developers using the library. They may notice allocation wins.

EvaluationEvent evaluationEvent = await EvaluateFeature<object>(feature, context: null, useContext: false, CancellationToken.None);

return evaluationEvent.Enabled;
return (await EvaluateFeature<object>(feature, context: null, useContext: false, CancellationToken.None).ConfigureAwait(false)).Enabled;
Copy link
Member

Choose a reason for hiding this comment

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

Was this ConfigureAwait previously missing (and all the others too)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants