ArgumentError (Attributes per element limit exceeded) when trying to open the diff of a locked topic

I’m also experiencing a very similar (or related) issue.

Reproduction steps / cause:

  • The problem occurs on extremely long posts (around 100,000 characters).
  • It is triggered specifically by large-scale revisions (when a huge portion of the content is changed).

When trying to save such a massive edit, the backend often hits a timeout (502/504). I suspect the root cause is the Diff calculation between the old and new versions, which becomes extremely expensive under these two conditions combined.