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

freelock created an issue. See original summary.

  • freelock committed 52a59c13 on 1.0.x
    chore: rebuild comment-thread bundle for #3622842
    

  • freelock committed 858d7df1 on 1.0.x
    fix: #3622842 Ship fewer per-comment URLs in drupalSettings
    

  • freelock committed f8d357b0 on 1.0.x
    test: #3622842 Compare visible URL keys as integers
    
freelock’s picture

Status: Active » Fixed

Fixed.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.