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

Use value task in INavigationProvider #16646

Closed
MikeAlhayek opened this issue Aug 31, 2024 · 1 comment · Fixed by #16650
Closed

Use value task in INavigationProvider #16646

MikeAlhayek opened this issue Aug 31, 2024 · 1 comment · Fixed by #16650

Comments

@MikeAlhayek
Copy link
Member

Currently, the navigation provider returns a Task.

public interface INavigationProvider
{
    Task BuildNavigationAsync(string name, NavigationBuilder builder);
}

In most implementations we do not need a task. I suggest changing that to return ValueTask instead. INavigationProvider is evaluated on every request and we could benefit from this optimization.

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

Successfully merging a pull request may close this issue.

2 participants