0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-06 13:08:40 +08:00
discourse/app/views/layouts
Alan Guo Xiang Tan a43c0bddf8
PERF: Avoid HTML escaping preloaded JSON (#41978)
Large preloaded JSON was stored inside an HTML attribute. Because JSON
contains quotation marks that could end the attribute early, Rails had
to convert those characters into HTML-safe text. Processing every
character made the response larger and slower to generate.

This change places the preloaded JSON in a non-executable
`application/json` script element and reads it from the element's text
content.

On a site with 11K categories, the escaping was showing up as a hotspot where we spend ~400ms escaping the massive preloaded JSON.
2026-07-24 09:25:06 +08:00
..
_head.html.erb FEATURE: beacon-based implementation for BPV (#38897) 2026-04-15 16:32:05 +03:00
_noscript_footer.html.erb
_noscript_header.html.erb
_plugin_js.html.erb DEV: Improve plugin js loading logic (#38278) 2026-03-05 14:18:40 +00:00
application.html.erb PERF: Avoid HTML escaping preloaded JSON (#41978) 2026-07-24 09:25:06 +08:00
crawler.html.erb FEATURE: Append locale to links in crawler view if present (#34466) 2025-08-22 08:46:33 +08:00
email_template.html.erb UX: add preview to email templates (#36657) 2026-01-08 11:33:53 +04:00
embed.html.erb DEV: Replace JS build system with Rolldown (#35963) 2026-05-29 11:11:55 +01:00
finish_installation.html.erb DEV: Allow new instances to be set up directly with Discourse ID (#36731) 2025-12-23 12:13:36 -05:00
no_ember.html.erb DEV: Replace JS build system with Rolldown (#35963) 2026-05-29 11:11:55 +01:00
publish.html.erb DEV: Replace JS build system with Rolldown (#35963) 2026-05-29 11:11:55 +01:00