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
Merge branch 'feature/UpdateTopic-performance' into develop
While the `feature/track-dirty-relationships` (afa1e9b) greatly improved the performance of recursively saving a large topic hierarchy by avoiding unnecessary and expensive calls to the `UpdateTopic` stored procedure, it did nothing to make that call itself less expensive. This update fixes that by reviewing and optimizing the `UpdateTopic` stored procedure, while simultaneously including additional functionality. In testing, the stored procedure is about twice as fast as it was previously, taking 18 seconds to update ≈250 topics, instead of the previous 38 seconds. And that's _with_ a new subquery to ensure that none of the indexed attributes are duplicating their previous value—something we currently do in `SqlTopicRepository`, but which is preferably enforced by the stored procedure itself.
This update includes:
- Lookup `@PreviousExtendedAttributes` directly from `ExtendedAttributes` instead of going through `ExtendedAttributeIndex` (b76ac69)
- Explored various performance improvements to nested query for null attributes, but found the current query to be optimal (4035bcc)
- Applied nested query to indexed attributes handling in order to prevent duplicates from being created (78dd6cd)
0 commit comments