Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 2
Batch load Deferred associations #127
Copy link
Copy link
Open
Labels
Area: RepositoriesRelates to the `ITopicRepository` interface or one of its implementations.Relates to the `ITopicRepository` interface or one of its implementations.Area: SQLRelates to the SQL Server database objects; do not use for the repository.Relates to the SQL Server database objects; do not use for the repository.Priority: 1Severity 2: MajorStatus 2: ScheduledPlanned for an upcoming release.Planned for an upcoming release.Type: ImprovementImproves the functionality or interface of an existing feature.Improves the functionality or interface of an existing feature.
Description
Metadata
Metadata
Assignees
Labels
Area: RepositoriesRelates to the `ITopicRepository` interface or one of its implementations.Relates to the `ITopicRepository` interface or one of its implementations.Area: SQLRelates to the SQL Server database objects; do not use for the repository.Relates to the SQL Server database objects; do not use for the repository.Priority: 1Severity 2: MajorStatus 2: ScheduledPlanned for an upcoming release.Planned for an upcoming release.Type: ImprovementImproves the functionality or interface of an existing feature.Improves the functionality or interface of an existing feature.
When a topic references several other topics that aren't loaded yet, the system currently resolves each one with its own separate database round-trip—i.e., one
Load()call per missing target. This plan replaces that with a single batched request for all missing targets at once, which is both faster and avoids a thread-safety trap that simply running them in parallel would introduce.Tasks
Load(IEnumerable<int> topicIds)overload toITopicRepositorySqlTopicRepository, backed by a single stored procedure callResolveAssociations()code paths into one, and move the loading logic intoLoadDeferredAssociations()(inLazyLoadingTopicRepository)