# Diff is too complex to display

**URL:** https://meta.discourse.org/t/diff-is-too-complex-to-display/400810
**Category:** Support
**Created:** [April 16, 2026, 4:49pm UTC](https://meta.discourse.org/t/diff-is-too-complex-to-display/400810 "2026-04-16T16:49:23Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Ethsim2](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ethsim2/32/522255_2.png) [@Ethsim2](https://meta.discourse.org/u/Ethsim2)
#### Post date: [April 16, 2026, 4:49pm UTC](https://meta.discourse.org/t/diff-is-too-complex-to-display/400810/1 "2026-04-16T16:49:23Z")

</div>

what are the thresholds for?

 ![IMG7091](https://global.discourse-cdn.com/meta/original/4X/7/5/a/75a938d370a8de3c589a6519314eebf203b47920.jpeg)

this was the result of a change of topic title where the event block is not in the OP - posts were merged in with preservation of chronology.

The history was shown on an edit notification for not the first post of the topic, nor the historic first post. The user with the edit notification isn’t watching the topic

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [April 17, 2026, 3:49pm UTC](https://meta.discourse.org/t/diff-is-too-complex-to-display/400810/2 "2026-04-17T15:49:33Z")

</div>

It’s a little [complicated](https://github.com/discourse/discourse/blob/fb075f3f2930f39fb84eaac8abee24ea90539b19/lib/onpdiff.rb) 🤔

So the code sets a **budget** : a maximum number of comparisons it’s allowed to make before it must stop and say “this is too hard.”

**How the budget is calculated?**

- It takes the combined size of the two texts and multiplies by 200. Bigger texts get a bigger budget.
- But there’s a hard ceiling of **2 million** comparisons—no matter how big the texts are, it will never try more than that.

**What happens when the budget runs out?**

- The code raises its hand and says “I give up”—it throws an error (`DiffLimitExceeded`) rather than letting the server grind away for seconds or minutes 😬

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [May 17, 2026, 3:50pm UTC](https://meta.discourse.org/t/diff-is-too-complex-to-display/400810/3 "2026-05-17T15:50:08Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
