-
Bug
-
Resolution: Fixed
-
Low
-
5.6.3, 5.6-OD-34-013, 5.9.1, 5.8.14, 5.9.3
-
None
NOTE: This bug report is for Confluence Server. Using Confluence Cloud? See the corresponding bug report.
Page move action requires a significant amount of insert/update/delete to the database as moving one page requires updating that page itself and all its descendant pages. This heavy procedure might cause bad user experience as they have to wait a considerable amount of time before their actions are completed. In addition, it's also the root cause of DB deadlock as it locks some tables for a quite long period of time.
Activities that slows down moving pages:
- Select/Update/Insert to CONFANCESTORS table
- Update JOURNALENTRY table
- Update links in moved pages.
Problems found with current implementation:
- CONTENTPROPERTIES is set loaded "eager" causing N+1 problem.
- Updating page's links procedure is called when pages are moved inside the same space (this heavy procedure should be skipped in this case).
- Each getAncestors() call creates one SELECT query to DB.
Update 17/11/2015
There is definitely some performance improvement in 5.8.6 (https://jira.atlassian.com/browse/CONF-35396?focusedCommentId=827923&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-827923) but not the order of magnitude I expected. Reopening issue because of that.
- relates to
-
CONFSERVER-35040 Page move action causes database deadlock and data corruption
-
- Closed
-
-
CONFSERVER-34870 The page move UI should provide feedback when the move is slow and multiple concurrent moves of the same page should be prevented
-
- Closed
-
-
CONFCLOUD-35396 Page move action is too slow when moving a large number of pages
-
- Closed
-
-
CONFSERVER-35096 Error moving object with pages "JIRA Issue / Filter"
-
- Gathering Impact
-
-
CONFSERVER-40454 Improve the performance of the page tree expansion on the Move Page dialog
- Gathering Interest
- is related to
-
HOT-25539 Loading...
All,
A bit of history: I opened https://jira.atlassian.com/browse/CONF-35040 for tracking deadlocks during page moves (because of concurrent transactions) and https://jira.atlassian.com/browse/CONF-34870 to track performance.
https://jira.atlassian.com/browse/CONF-34870 was then reworded and resolved and superseded by https://jira.atlassian.com/browse/CONF-35396 (current ticket).
Original state of things was that moving couple dozen pages within a space will take over one minute (functionality easy accessible from space hierarchy view by all users). Now it shouldn't take more than few seconds.
Many people reported that move of few hundred pages would took overnight and caused heavy server load - it shouldn't happen anymore.
Cross space page move with many descendants (1K+) still be heavy on server because of permission re-index and attachment re-index. Nevertheless you should expect cross space move to be at least as twice as it was before.
For admins of instances, keep in mind that 3rd party plugins usually registered as event listeners and also can contribute to page move slowness.
To sump up:
Cheers
Petro