Glass.Mapper
Glass.Mapper copied to clipboard
Performance - BeginRenderLink does not use Expression Tree Cache
Should the BeginRenderLink method use the protected GetCompiled method?
From:
return BeginRenderLink(field.Compile().Invoke(model) as Link, attrs, string.Empty, writer);
To:
return BeginRenderLink(GetCompiled(field).Invoke(model) as Link, attrs, string.Empty, writer);
At the minute the Expression cache won't be used, which seems to have a small impact from my local profiling.
Good suggestion, I will investigate.