You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Add a Load(IEnumerable<int> topicIds) overload to ITopicRepository
Default implementation just loops sequentially, so any repository gets correct (if unoptimized) behavior for free
Implement a real batch version in SqlTopicRepository, backed by a single stored procedure call
Merge the two existing ResolveAssociations() code paths into one, and move the loading logic into LoadDeferredAssociations() (in LazyLoadingTopicRepository)
Rewire `LoadDeferredAssociations() to find missing targets, batch load them, resolve the associations, then clear any that are still missing as stale
Activity