I’m working on a site for a client that has GravityForms. While debugging some performance problems, I found the
GForms::ensure_hook_js_output function. It seems to output buffer the whole content and then throw that content into DomDocument. This has two problems:
- It adds load time to every page on the site
- One sufficiently large pages it adds an extra layer of output buffering, resulting in extra memory usage. Resulting in a max memory 500 error. In the case I’m debugging this is because of XML sitemaps.