0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-05 11:52:32 +08:00
discourse/app/views
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
..
about FEATURE: Localizable /about page fields via its settings page (#41123) 2026-06-26 20:41:08 +08:00
admin/backups
application FIX: Respect forced color mode for logo on server-rendered pages (#37032) 2026-01-09 11:33:06 +01:00
badges
categories
common DEV: Drop empty core mobile/desktop stylesheets (#41988) 2026-07-23 20:30:13 +01:00
default DEV: Replace JS build system with Rolldown (#35963) 2026-05-29 11:11:55 +01:00
dev_mode DEV: Add /dev-mode endpoint for MiniProfiler auth cookie (#37027) 2026-01-12 10:01:20 +08:00
email UX: add preview to email templates (#36657) 2026-01-08 11:33:53 +04:00
embed DEV: Extract embed post date title into i18n-aware helper (#38594) 2026-03-17 09:12:21 -05:00
exceptions DEV: Replace JS build system with Rolldown (#35963) 2026-05-29 11:11:55 +01:00
finish_installation DEV: escape emails in finish installation (#37665) 2026-02-10 11:53:18 +01:00
groups
home_page
invites
layouts PERF: Avoid HTML escaping preloaded JSON (#41978) 2026-07-24 09:25:06 +08:00
list FIX: Prevent double-escaping of HTML entities in titles and meta descriptions (#41261) 2026-07-02 20:26:35 +02:00
metadata
offline
posts
published_pages DEV: properly import color-scheme-stylesheets (#36325) 2025-11-28 13:57:22 -06:00
qunit DEV: Drop empty core mobile/desktop stylesheets (#41988) 2026-07-23 20:30:13 +01:00
robots_txt
safe_mode
search
session
sitemap
static FIX: improve the reliability of chat sounds (#41373) 2026-07-02 18:52:41 -04:00
tags
topics FIX: Prevent double-escaping of HTML entities in titles and meta descriptions (#41261) 2026-07-02 20:26:35 +02:00
user_notifications DEV: Strip unsubscribe links when sending digest previews to arbitrary addresses (#38298) 2026-03-05 13:58:51 -06:00
users UX: Redesign OmniAuth confirmation page with branded styling (#39290) 2026-04-15 14:46:31 -07:00