ede icon indicating copy to clipboard operation
ede copied to clipboard

Performance implications of using the filters API?

Open saurabhnanda opened this issue 1 year ago • 0 comments

I want to use filters which operate on complete object, such as:

orderSummary :: Order -> Text

This forces me to define an Unqote instance for the Order type, which (as per my understanding) is a Aeson.Value -> Order parsing step. Does this mean that each of the following call sites is going to parse Aeson.Value -> Order?

{{ order | orderSummary }}
{{ order | orderTotal }}
{{ order | shippingAddress }}

Is there a faster/performant way of doing this? Instead of filters, should I make these available as template-snippets that can be included via a custom resolver?

saurabhnanda avatar Jan 30 '24 09:01 saurabhnanda