Add perf explanation
This commit is contained in:
@@ -718,8 +718,10 @@ namespace Umbraco.Core
|
||||
if (AssignableTypeCache.TryGetValue(key, out bool canConvert))
|
||||
{
|
||||
return canConvert;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// "object is" is faster than "Type.IsAssignableFrom.
|
||||
// We can use it to very quickly determine whether true/false
|
||||
if (input is IConvertible && target.IsAssignableFrom(source))
|
||||
{
|
||||
return AssignableTypeCache[key] = true;
|
||||
|
||||
Reference in New Issue
Block a user