U4-10845 - MultiNodeTreePickerPropertyConverter - if picked content is trashed, causes 2 database lookups

Created by Lee Kelleher 18 Jan 2018, 10:31:28 Updated by Lee Kelleher 24 Jan 2018, 11:47:14

Tags: PR

Subtask of: U4-9609

If the first ID in the MNTP value is a trashed content node, then MultiNodeTreePickerPropertyConverter's ConvertSourceToObject method would not be able to find the content node, so it would check if the ID is a media or member node, both of these incur a database call.

This can cause a detrimental performance impact on the website.


A potential fix for this could be to use the startNode.type prevalue to detect the node type, (e.g. Content, Media or Member). Then the prevalue could be cached in a private ConcurrentDictionary and refreshed using the DataTypeCacheRefresher event. ''(Much like the Slider, Tags and NestedContent value-converters do)''


Lee Kelleher 18 Jan 2018, 10:51:54

PR submitted: https://github.com/umbraco/Umbraco-CMS/pull/2397

Robert Copilau 24 Jan 2018, 11:45:37

The code looks good and works, awesome job @leekelleher as always :). Merging.

Lee Kelleher 24 Jan 2018, 11:47:14

Thanks @robertcopilau!

Priority: Normal

Type: Bug

State: Fixed


Difficulty: Normal


Backwards Compatible: True

Fix Submitted: Pull request

Affected versions: 7.7.8

Due in version: 7.7.10

Sprint: Sprint 77

Story Points: 1

Cycle: 7