-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Low
-
Affects Version/s: 7.13.8
-
Component/s: Content - Page
-
3
-
Severity 3 - Minor
-
44
Issue Summary
When a large page is modified, Confluence notification HTML page diff generation consumes high CPU and runs for a long time.
This is reproducible on Data Center: yes
Steps to Reproduce
- Setup Confluence connected to a SMTP Server
- Install Confluence Source Editor
- Create a page in Confluence with this Storage Format File11111.txt

- Edit the page and replace the entire Storage Format with this updated Storage Format File222222.txt

- Publish the page
Expected Results
The internal DaisyHtmlDiffer process should timeout after the default 30 seconds value in the absence of confluence.html.diff.timeout JVM flag.
For the same test case, Confluence 6.15.10 behaviour does timeout after default 30 seconds ![]()
Actual Results
The notification thread will continue to process the HTML until the HTML diff is completed. In our specific example, it continued to run for 10+ minutes consuming high CPU in the process.
Taking Thread Dumps, you will see:
"NotificationSender:thread-1" #376 daemon prio=5 os_prio=31 tid=0x00007f9a4712a000 nid=0x54cf7 runnable [0x00000003185ef000] java.lang.Thread.State: RUNNABLE at org.outerj.daisy.diff.html.dom.TagNode.getMinimalDeletedSet(TagNode.java:299) at org.outerj.daisy.diff.html.dom.TagNode.getMinimalDeletedSet(TagNode.java:299) at org.outerj.daisy.diff.html.dom.TagNode.getMinimalDeletedSet(TagNode.java:299) at org.outerj.daisy.diff.html.dom.TagNode.getMinimalDeletedSet(TagNode.java:299) at org.outerj.daisy.diff.html.dom.TagNode.getMinimalDeletedSet(TagNode.java:299) at org.outerj.daisy.diff.html.dom.TagNode.getMinimalDeletedSet(TagNode.java:299) at org.outerj.daisy.diff.html.dom.TagNode.getMinimalDeletedSet(TagNode.java:299) at org.outerj.daisy.diff.html.dom.TagNode.getMinimalDeletedSet(TagNode.java:299) at org.outerj.daisy.diff.html.dom.TagNode.getMinimalDeletedSet(TagNode.java:299) at org.outerj.daisy.diff.html.dom.BodyNode.getMinimalDeletedSet(BodyNode.java:47) at org.outerj.daisy.diff.html.TextNodeComparator.markAsDeleted(TextNodeComparator.java:231) at org.outerj.daisy.diff.html.HTMLDiffer.diff(HTMLDiffer.java:80) at com.atlassian.confluence.diff.DaisyHtmlDiffer.diff(DaisyHtmlDiffer.java:222) at com.atlassian.confluence.diff.DaisyHtmlDiffer.renderContentAndDiff(DaisyHtmlDiffer.java:158) at com.atlassian.confluence.diff.DaisyHtmlDiffer.createOrGetFutureDiff(DaisyHtmlDiffer.java:141) at com.atlassian.confluence.diff.DaisyHtmlDiffer.diff(DaisyHtmlDiffer.java:114) at com.atlassian.confluence.diff.WikiConvertingHtmlDiffer.lambda$diff$0(WikiConvertingHtmlDiffer.java:54) at com.atlassian.confluence.diff.WikiConvertingHtmlDiffer$$Lambda$3876/630108223.call(Unknown Source) ... ..
Attempting to set JVM override flag -Dconfluence.html.diff.timeout=30000 also has no effect ![]()
Workaround
If the "large page" update is being triggered by an API and an email notification is not required, setting minorEdit to true will not result in a page notification for the page edit.