Glass.Mapper icon indicating copy to clipboard operation
Glass.Mapper copied to clipboard

Performance - BeginRenderLink does not use Expression Tree Cache

Open michael-huxtable opened this issue 9 years ago • 1 comments

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.

michael-huxtable avatar Nov 30 '16 11:11 michael-huxtable

Good suggestion, I will investigate.

mikeedwards83 avatar Dec 05 '16 19:12 mikeedwards83