Problem/Motivation
For 216 comments, the advancedCommentThreads drupalSettings payload is ~214 KB, dominated by three per-comment URL maps (contextUrls, commentUrls, branchUrls at ~63 KB each, ~190 KB total). Every comment carries three fully-qualified signed URLs though only a handful are used under progressive loading. The signature is field-level, not per-comment, so it is repeated 216 x 3 without reason.
Steps to reproduce
- Open a node with 200+ comments under ACT.
- Inspect the drupal-settings-json payload; note the size of advancedCommentThreads.
- Observe the ~190 KB of redundant contextUrls/commentUrls/branchUrls.
Proposed resolution
- Ship URLs only for initially-visible comments.
- Build the remaining URLs client-side from one shared field-level signature and template, or resolve a URL lazily via one small endpoint.
Remaining tasks
- Confirm the payload drops well below the current ~214 KB on a real 216-comment thread.
User interface changes
Faster initial page load; no visible layout change.
API changes
Reduce or remove the per-comment URL maps exposed in drupalSettings; provide a lazy URL resolution path.
Data model changes
None anticipated.
Comments
Comment #5
freelockFixed.