Skip to content

Ensure MVC Controller and dependencies are fully asynchronous #126

Description

@JeremyCaney

As part of the lazy-loading project (#111), I made all of the ITopicRepository members async. There remain a couple of actions in the OnTopic.AspNetCore library that are synchronous, however, and thus can't take advantage of this—not to mention other performance features of ASP.NET Core. There are also a couple of dependencies that are still synchronous, such as methods on the IHierarchicalTopicRepository.

  • Convert RedirectController to async
  • Convert SitemapController to async
  • Convert IHierarchicalTopicRepository.GetHierarchicalRoot() to async
  • Convert Load(topicRepository, routeData) to async (in TopicRepositoryExtensions)
  • Convert CurrentTopic to async GetCurrentTopic() (in TopicController, ErrorController)
  • Rename IndexAsync() and HttpAsync() to Index() and Http() (in ErrorController)
  • Replace base.OnActionExecuting(context) with await next().ConfigureAwait(false) (in ValidateTopicAttribute, TopicResponseCacheAttribute
  • Create unit tests to validate the above logic

Metadata

Metadata

Assignees

Labels

Area: WebRelates to the `AspNetCore` or other web-related functionality.Priority: 2Severity 1: MinorStatus 2: ScheduledPlanned for an upcoming release.Type: ImprovementImproves the functionality or interface of an existing feature.

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions