Add perf explanation

This commit is contained in:
James Jackson-South
2018-01-22 20:58:15 +11:00
parent b0a64655b4
commit de4628f450

View File

@@ -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;