dagd
dagd copied to clipboard
`DaGdResponse` calls `getBody()` twice causing `DaGdHTMLResponse` to render the HTML AST twice
DaGdReponse calls getBody() both to calculate the content-length header and to render the actual AST and echo it out.
Both times, in the case of DaGdHTMLResponse this means we build up the AST twice (and any side effects that happen e.g. in implementations of DaGdToTagInterface#toTag get called twice because of it).
This is less than ideal both from a performance standpoint (rendering the AST out can be expensive) and from a "why is toTag() getting called twice??" perspective.