Slow Page Load When It Contains A Lot Of Links
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Problem
Page loads slowly when it contains a lot of links. At times, it may be fast for a while, then the performance starts to degrade again
The following appears in the atlassian-confluence
.log (with profiling enabled):
2015-11-05 06:59:48,728 DEBUG [http-nio-8090-exec-2] [atlassian.util.profiling.UtilTimerStack] log [213ms] - /display/KEY/test+links
[0ms] - UserAccessor.getExistingUserByKey()
[2ms] - UserAccessor.getUserByName()
[0ms] - UserAccessor.getExistingUserByKey()
[0ms] - UserAccessor.getUserByName()
[134ms] - XW Interceptor: Before defaultStack: /pages/viewpage.action (ViewPageAction.execute())
[0ms] - UserAccessor.exists()
[0ms] - UserAccessor.getPropertySet()
[0ms] - SpaceAwareInterceptor.intercept()
[4ms] - PageAwareInterceptor.intercept()
[3ms] - PageManager.getPage()
[1ms] - PermissionManager.hasPermission()
[0ms] - UserAccessor.getGroup()
[0ms] - UserAccessor.hasMembership()
[0ms] - PermissionManager.hasPermission()
[0ms] - CommentAwareInterceptor.intercept()
[0ms] - UserAwareInterceptor.intercept()
[0ms] - BootstrapAwareInterceptor.intercept()
[0ms] - PermissionManager.hasPermission()
[101ms] - XW Interceptor: After defaultStack: /pages/viewpage.action (ViewPageAction.execute())
[101ms] - XW Interceptor: After validatingStack: /pages/viewpage.action (ViewPageAction.execute())
[0ms] - PageManager.getPage()
[0ms] - PageManager.getPage()
[0ms] - PageManager.getPage()
[1ms] - PageManager.getPage()
[0ms] - PageManager.getPage()
[1ms] - PageManager.getPage()
[0ms] - PageManager.getPage()
[0ms] - PermissionManager.hasPermission()
[0ms] - PermissionManager.hasPermission()
[0ms] - PermissionManager.hasPermission()
[0ms] - PermissionManager.hasPermission()
[0ms] - PermissionManager.hasPermission()
[0ms] - PermissionManager.hasPermission()
[0ms] - PermissionManager.hasPermission()
[88ms] - XW View: doExecute(/pages/viewpage.vm)
[2ms] - XW View: getTemplate(/pages/viewpage.vm)
[83ms] - ApplyDecoratorDirective.render()
[0ms] - SpaceManager.getSpace()
[0ms] - UserAccessor.getPropertySet()
[80ms] - Rendering velocity template: /decorators/root.vmd
[80ms] - ApplyDecoratorDirective.render()
[0ms] - SpaceManager.getSpace()
[0ms] - UserAccessor.getPropertySet()
[79ms] - Rendering velocity template: /decorators/page.vmd
[0ms] - Rendering velocity template: /includes/skiplinked-section.vm
[28ms] - Parse: /decorators/includes/content-navigation.vm
[0ms] - PermissionManager.hasPermission()
[1ms] - NotificationManager.getNotificationByUserAndPage()
[1ms] - NotificationManager.getNotificationByUserAndSpace()
[0ms] - NotificationManager.getNotificationByUserAndSpaceAndType()
[0ms] - PermissionManager.hasPermission()
[1ms] - NotificationManager.getNotificationByUserAndPage()
[1ms] - NotificationManager.getNotificationByUserAndSpace()
[0ms] - NotificationManager.getNotificationByUserAndSpaceAndType()
[0ms] - PermissionManager.hasPermission()
[1ms] - NotificationManager.getNotificationByUserAndPage()
[1ms] - NotificationManager.getNotificationByUserAndSpace()
[0ms] - NotificationManager.getNotificationByUserAndSpaceAndType()
[0ms] - PermissionManager.hasPermission()
[0ms] - PermissionManager.hasCreatePermission()
[0ms] - PermissionManager.hasPermission()
[0ms] - PermissionManager.hasCreatePermission()
[0ms] - PermissionManager.hasPermission()
[0ms] - PageTemplateManager.getGlobalPageTemplates()
[0ms] - PermissionManager.hasCreatePermission()
[0ms] - PermissionManager.hasPermission()
[0ms] - PermissionManager.hasCreatePermission()
[0ms] - PermissionManager.hasPermission()
[0ms] - PermissionManager.hasCreatePermission()
[0ms] - PermissionManager.hasCreatePermission()
[0ms] - PermissionManager.hasPermission()
[0ms] - PermissionManager.hasCreatePermission()
[0ms] - PermissionManager.hasPermission()
[0ms] - PermissionManager.hasPermission()
[0ms] - PermissionManager.hasPermission()
[0ms] - PermissionManager.hasPermission()
[0ms] - PermissionManager.hasPermission()
[0ms] - PermissionManager.hasPermission()
[0ms] - PermissionManager.hasPermission()
[0ms] - UserAccessor.getPropertySet()
[0ms] - PermissionManager.hasPermission()
[0ms] - PermissionManager.hasPermission()
[0ms] - UserAccessor.getPropertySet()
[0ms] - PermissionManager.hasPermission()
[0ms] - PermissionManager.hasPermission()
[0ms] - PermissionManager.hasPermission()
[0ms] - PermissionManager.isConfluenceAdministrator()
[0ms] - PermissionManager.hasPermission()
[0ms] - PermissionManager.hasPermission()
[0ms] - PermissionManager.hasPermission()
[0ms] - PermissionManager.hasCreatePermission()
[0ms] - PermissionManager.hasPermission()
[0ms] - PermissionManager.hasPermission()
[0ms] - PermissionManager.hasPermission()
[0ms] - PermissionManager.hasPermission()
[0ms] - PermissionManager.hasPermission()
[0ms] - SpaceManager.getLogoForSpace()
[0ms] - SpaceManager.getLogoForSpace()
[0ms] - SpaceManager.getSpace()
[0ms] - FormatSettingsManager.getDateFormat()
[0ms] - FormatSettingsManager.getDateTimeFormat()
[0ms] - FormatSettingsManager.getTimeFormat()
[0ms] - FormatSettingsManager.getDateFormat()
[0ms] - FormatSettingsManager.getDateTimeFormat()
[0ms] - FormatSettingsManager.getEditorBlogPostDate()
[0ms] - SpaceManager.getSpace()
[0ms] - PermissionManager.hasCreatePermission()
[0ms] - PermissionManager.hasCreatePermission()
[0ms] - FormatSettingsManager.getDateFormat()
[0ms] - FormatSettingsManager.getDateTimeFormat()
[0ms] - FormatSettingsManager.getTimeFormat()
[0ms] - FormatSettingsManager.getDateFormat()
[0ms] - FormatSettingsManager.getDateTimeFormat()
[0ms] - FormatSettingsManager.getEditorBlogPostDate()
[0ms] - SpacePermissionManager.hasPermission()
[0ms] - UserAccessor.getGroup()
[0ms] - UserAccessor.hasMembership()
[0ms] - SpacePermissionManager.hasPermission()
[0ms] - UserAccessor.getGroup()
[0ms] - UserAccessor.hasMembership()
[0ms] - UserAccessor.getPropertySet()
[0ms] - SpaceManager.getSpace()
[1ms] - Rendering velocity template: vm/tree.vm
[0ms] - UserAccessor.getPropertySet()
[0ms] - UserAccessor.getPropertySet()
[1ms] - Parse: /decorators/includes/page-content-includes.vm
[0ms] - Parse: /template/includes/actionerrors.vm
[1ms] - Parse: /decorators/includes/link-to-this-page.vm
[0ms] - Parse: /template/includes/page-move-templates.vm
[0ms] - PermissionManager.hasPermission()
[0ms] - Parse: /template/includes/search-results-grid-templates.vm
[3ms] - Parse: /decorators/includes/page-metadata.vm
[0ms] - PermissionManager.hasPermission()
[0ms] - PermissionManager.hasPermission()
[0ms] - UserAccessor.getConfluenceUserPreferences()
[0ms] - FormatSettingsManager.getDateFormat()
[0ms] - FormatSettingsManager.getDateTimeFormat()
[0ms] - FormatSettingsManager.getTimeFormat()
[0ms] - FormatSettingsManager.getDateFormat()
[0ms] - FormatSettingsManager.getDateTimeFormat()
[0ms] - FormatSettingsManager.getEditorBlogPostDate()
[0ms] - Rendering velocity template: /includes/skiplinked-section.vm
[0ms] - UserAccessor.getPropertySet()
[1ms] - Parse: /com/atlassian/confluence/plugins/labels/components/labels-editor.vm
[1ms] - Parse: /com/atlassian/confluence/plugins/labels/components/labels-content.vm
[1ms] - Parse: /com/atlassian/confluence/plugins/labels/components/labels-list.vm
[8ms] - ApplyDecoratorDirective.render()
[0ms] - SpaceManager.getSpace()
[0ms] - UserAccessor.getPropertySet()
[7ms] - Rendering velocity template: /decorators/root.vmd
[7ms] - ApplyDecoratorDirective.render()
[0ms] - SpaceManager.getSpace()
[0ms] - UserAccessor.getPropertySet()
[7ms] - Rendering velocity template: /decorators/components/comments.vmd
[1ms] - NotificationManager.getNotificationByUserAndContent()
[0ms] - PermissionManager.hasCreatePermission()
[3ms] - Rendering velocity template: templates/quick-comment.vm
[0ms] - PermissionManager.hasCreatePermission()
[0ms] - UserAccessor.getPropertySet()
[1ms] - UserAccessor.getUserProfilePicture()
[0ms] - Rendering soy template: com.atlassian.confluence.plugins.quickedit:quick-comment-initial:Confluence.Templates.Comments.displayTopLevelCommentEditorPlaceholder.soy
[0ms] - PermissionManager.hasCreatePermission()
[0ms] - UserAccessor.getPropertySet()
[5ms] - Parse: /pages/page-breadcrumbs.vm
[4ms] - Parse: /breadcrumbs.vm
[7ms] - Parse: /template/includes/space-tools-web-items.vm
[6ms] - system.space.tools
[0ms] - PermissionManager.hasPermission()
[0ms] - PermissionManager.hasPermission()
[0ms] - PermissionManager.hasPermission()
[0ms] - PermissionManager.hasPermission()
[0ms] - PermissionManager.hasPermission()
[0ms] - PermissionManager.hasPermission()
[0ms] - PermissionManager.hasPermission()
[0ms] - PermissionManager.hasPermission()
[1ms] - NotificationManager.getNotificationByUserAndSpace()
[0ms] - NotificationManager.getNotificationByUserAndSpaceAndType()
[0ms] - NotificationManager.getNotificationByUserAndSpaceAndType()
[0ms] - NotificationManager.getNotificationByUserAndSpace()
[0ms] - NotificationManager.getNotificationByUserAndSpace()
[1ms] - NotificationManager.getNotificationByUserAndSpaceAndType()
[0ms] - NotificationManager.getNotificationByUserAndSpace()
[0ms] - NotificationManager.getNotificationByUserAndSpaceAndType()
[0ms] - PermissionManager.hasPermission()
[0ms] - PermissionManager.hasPermission()
[0ms] - PermissionManager.hasPermission()
[0ms] - PermissionManager.hasCreatePermission()
[0ms] - PermissionManager.hasPermission()
[0ms] - PermissionManager.hasCreatePermission()
[0ms] - PermissionManager.hasPermission()
[1ms] - PageTemplateManager.getGlobalPageTemplates()
[0ms] - PermissionManager.hasCreatePermission()
[0ms] - PermissionManager.hasPermission()
[0ms] - PermissionManager.hasCreatePermission()
[0ms] - PermissionManager.hasPermission()
[0ms] - PermissionManager.hasCreatePermission()
[0ms] - PermissionManager.hasCreatePermission()
[0ms] - PermissionManager.hasPermission()
[0ms] - PermissionManager.hasCreatePermission()
[0ms] - PermissionManager.hasPermission()
[0ms] - PermissionManager.hasCreatePermission()
[0ms] - PermissionManager.hasCreatePermission()
[0ms] - UserAccessor.getPropertySet()
[1ms] - SpaceManager.getSpace()
[66ms] - SiteMesh: applyDecorator: main (/decorators/main.vmd)
[64ms] - Rendering velocity template: /decorators/main.vmd
[32ms] - Parse: /decorators/includes/header.vm
[0ms] - UserAccessor.getUserProfilePicture()
[0ms] - UserAccessor.getPropertySet()
[0ms] - UserAccessor.getUserPreferences()
[0ms] - UserAccessor.getPropertySet()
[0ms] - SpacePermissionManager.hasPermission()
[0ms] - PermissionManager.isConfluenceAdministrator()
[0ms] - Rendering velocity template: templates/date-header.vm
[0ms] - FormatSettingsManager.getDateFormat()
[0ms] - UserAccessor.getUserByName()
[0ms] - PermissionManager.isSystemAdministrator()
[0ms] - UserAccessor.getPropertySet()
[0ms] - UserAccessor.getPropertySet()
[0ms] - SpacePermissionManager.hasPermission()
[0ms] - DefaultSpacePermissionManager.hasPermissionNoExemptions(USECONFLUENCE, anonymous, global)
[0ms] - UserAccessor.isDeactivated()
[0ms] - UserAccessor.getPropertySet()
[0ms] - UserAccessor.getExistingUserByKey()
[0ms] - PermissionManager.hasPermission()
[0ms] - UserAccessor.getPropertySet()
[0ms] - UserAccessor.getPropertySet()
[0ms] - UserAccessor.getPropertySet()
[0ms] - UserAccessor.getPropertySet()
[0ms] - PermissionManager.hasPermission()
[0ms] - UserAccessor.getUserByName()
[0ms] - PermissionManager.hasPermission()
[0ms] - UserAccessor.getPropertySet()
[0ms] - SpacePermissionManager.hasPermission()
[0ms] - UserAccessor.getPropertySet()
[0ms] - UserAccessor.getExistingUserByKey()
[0ms] - PermissionManager.hasPermission()
[0ms] - UserAccessor.getPropertySet()
[0ms] - UserAccessor.getPropertySet()
[0ms] - UserAccessor.getPropertySet()
[0ms] - UserAccessor.getPropertySet()
[0ms] - PermissionManager.hasPermission()
[0ms] - UserAccessor.getUserByName()
[0ms] - PermissionManager.hasPermission()
[0ms] - UserAccessor.getPropertySet()
[0ms] - SpacePermissionManager.hasPermission()
[0ms] - UserAccessor.getPropertySet()
[0ms] - UserAccessor.getExistingUserByKey()
[0ms] - PermissionManager.hasPermission()
[0ms] - UserAccessor.getPropertySet()
[0ms] - UserAccessor.getPropertySet()
[0ms] - UserAccessor.getPropertySet()
[1ms] - UserAccessor.getPropertySet()
[0ms] - PermissionManager.hasPermission()
[0ms] - UserAccessor.getUserByName()
[0ms] - PermissionManager.hasPermission()
[0ms] - UserAccessor.getPropertySet()
[0ms] - SpacePermissionManager.hasPermission()
[0ms] - UserAccessor.getPropertySet()
[0ms] - UserAccessor.getExistingUserByKey()
[0ms] - PermissionManager.hasPermission()
[0ms] - UserAccessor.getPropertySet()
[0ms] - UserAccessor.getPropertySet()
[0ms] - UserAccessor.getPropertySet()
[0ms] - UserAccessor.getPropertySet()
[0ms] - PermissionManager.hasPermission()
[0ms] - UserAccessor.getUserByName()
[0ms] - PermissionManager.hasPermission()
[0ms] - UserAccessor.getPropertySet()
[0ms] - SpacePermissionManager.hasPermission()
[0ms] - UserAccessor.getPropertySet()
[0ms] - UserAccessor.getExistingUserByKey()
[0ms] - PermissionManager.hasPermission()
[0ms] - UserAccessor.getPropertySet()
[0ms] - UserAccessor.getPropertySet()
[0ms] - UserAccessor.getPropertySet()
[0ms] - UserAccessor.getPropertySet()
[0ms] - PermissionManager.hasPermission()
[0ms] - UserAccessor.getUserByName()
[0ms] - PermissionManager.hasPermission()
[0ms] - UserAccessor.getPropertySet()
[0ms] - SpacePermissionManager.hasPermission()
[0ms] - UserAccessor.getPropertySet()
[0ms] - UserAccessor.getExistingUserByKey()
[0ms] - PermissionManager.hasPermission()
[0ms] - UserAccessor.getPropertySet()
[0ms] - UserAccessor.getPropertySet()
[0ms] - UserAccessor.getPropertySet()
[0ms] - UserAccessor.getPropertySet()
[0ms] - PermissionManager.hasPermission()
[0ms] - UserAccessor.getUserByName()
[0ms] - PermissionManager.hasPermission()
[0ms] - UserAccessor.getPropertySet()
[0ms] - SpacePermissionManager.hasPermission()
[0ms] - UserAccessor.getPropertySet()
[0ms] - UserAccessor.getExistingUserByKey()
[0ms] - PermissionManager.hasPermission()
[0ms] - UserAccessor.getPropertySet()
[0ms] - UserAccessor.getPropertySet()
[0ms] - UserAccessor.getPropertySet()
[0ms] - UserAccessor.getPropertySet()
[0ms] - PermissionManager.hasPermission()
[1ms] - UserAccessor.getUserByName()
[0ms] - PermissionManager.hasPermission()
[0ms] - UserAccessor.getPropertySet()
[0ms] - SpacePermissionManager.hasPermission()
[0ms] - UserAccessor.getPropertySet()
[0ms] - UserAccessor.getExistingUserByKey()
[0ms] - PermissionManager.hasPermission()
[0ms] - UserAccessor.getPropertySet()
[0ms] - UserAccessor.getPropertySet()
[0ms] - UserAccessor.getPropertySet()
[0ms] - UserAccessor.getPropertySet()
[0ms] - PermissionManager.hasPermission()
[0ms] - UserAccessor.getUserByName()
[0ms] - PermissionManager.hasPermission()
[0ms] - UserAccessor.getPropertySet()
[0ms] - SpacePermissionManager.hasPermission()
[0ms] - UserAccessor.getPropertySet()
[0ms] - UserAccessor.getExistingUserByKey()
[0ms] - PermissionManager.hasPermission()
[0ms] - UserAccessor.getPropertySet()
[0ms] - UserAccessor.getPropertySet()
[0ms] - UserAccessor.getPropertySet()
[0ms] - UserAccessor.getPropertySet()
[0ms] - PermissionManager.hasPermission()
[0ms] - UserAccessor.getUserByName()
[0ms] - PermissionManager.hasPermission()
[0ms] - UserAccessor.getPropertySet()
[0ms] - SpacePermissionManager.hasPermission()
[0ms] - UserAccessor.getPropertySet()
[0ms] - UserAccessor.getExistingUserByKey()
[0ms] - PermissionManager.hasPermission()
[0ms] - UserAccessor.getPropertySet()
[0ms] - UserAccessor.getPropertySet()
[0ms] - UserAccessor.getPropertySet()
[0ms] - UserAccessor.getPropertySet()
[0ms] - PermissionManager.hasPermission()
[0ms] - UserAccessor.getUserByName()
[0ms] - PermissionManager.hasPermission()
[0ms] - UserAccessor.getPropertySet()
[0ms] - SpacePermissionManager.hasPermission()
[0ms] - UserAccessor.getPropertySet()
[0ms] - UserAccessor.getExistingUserByKey()
[0ms] - PermissionManager.hasPermission()
[0ms] - UserAccessor.getPropertySet()
[0ms] - UserAccessor.getPropertySet()
[0ms] - UserAccessor.getPropertySet()
[0ms] - UserAccessor.getPropertySet()
[0ms] - PermissionManager.hasPermission()
[0ms] - UserAccessor.getUserByName()
[0ms] - PermissionManager.hasPermission()
[0ms] - UserAccessor.getExistingUserByKey()
[0ms] - PermissionManager.hasPermission()
[0ms] - PermissionManager.isConfluenceAdministrator()
[0ms] - UserAccessor.getPropertySet()
[0ms] - Parse: /decorators/includes/main-content-includes.vm
[0ms] - Parse: /template/includes/global-settings.vm
[1ms] - MessageManager.getMessages()
[24ms] - Parse: /decorators/includes/common-header.vm
[5ms] - Parse: /decorators/includes/aui-header-primary.vm
[0ms] - PermissionManager.hasPermission()
[0ms] - PermissionManager.hasPermission()
[0ms] - PermissionManager.hasPermission()
[0ms] - SpaceManager.getSpaces()
[2ms] - UserAccessor.isSuperUser()
[0ms] - SpaceManager.getSpaces()
[0ms] - UserAccessor.isSuperUser()
[0ms] - PermissionManager.isConfluenceAdministrator()
[0ms] - UserAccessor.getPropertySet()
[17ms] - Parse: /decorators/includes/aui-header-secondary.vm
[0ms] - UserAccessor.getPropertySet()
[0ms] - PermissionManager.isConfluenceAdministrator()
[0ms] - PermissionManager.isConfluenceAdministrator()
[0ms] - PermissionManager.isConfluenceAdministrator()
[0ms] - PermissionManager.isConfluenceAdministrator()
[0ms] - UserAccessor.getPropertySet()
[0ms] - PermissionManager.isConfluenceAdministrator()
[0ms] - PermissionManager.hasPermission()
[0ms] - UserAccessor.getUserProfilePicture()
[0ms] - PermissionManager.hasCreatePermission()
[0ms] - SpaceManager.getPersonalSpace()
[1ms] - SpaceManager.getPersonalSpace()
[0ms] - PersonalInformationManager.getOrCreatePersonalInformation()
[0ms] - PermissionManager.hasCreatePermission()
[0ms] - PermissionManager.hasCreatePermission()
[0ms] - Rendering soy template: com.atlassian.plugins.atlassian-nav-links-plugin:rotp-menu:navlinks.templates.appswitcher.switcher.soy
[1ms] - Rendering soy template: com.atlassian.auiplugin:aui-experimental-soy-templates:aui.page.header.soy
[1ms] - Rendering velocity template: /decorators/includes/footer.vm
[1ms] - Parse: /decorators/includes/footer-content.vm
Cause
The com.atlassian.confluence.pages.persistence.dao.PageDao.getPage()
cache has a default expiry of 1 hour. This is further aggravated by this bug:
-
CONF-5494Getting issue details...
STATUS
Resolution
For Confluence 5.9 and above:
Extract the confluence-cache-ehcache-x.x.x.jar in your
ConfluenceInstallation/confluence/WEB-INF/lib
to a new directoryCopy the ehcache-settings-defaults.conf file and put it in
ConfluenceInstallation/confluence/WEB-INF/classes
(after that, remove the directory you created in step 1)Add a new caching option called "verylarge-long-lived" and add it after the definition for "large":
verylarge-long-lived = ${default} { max-entries = 10000, expire-after-access-secs = 86400 // a day }
Look for the line containing the following name:
com.atlassian.confluence.pages.persistence.dao.PageDao.getPage
The "name" may or may not include the "()" after "getPage"
Change the value of config from "default" to "verylarge-long-lived"
If the line has a declaration for "expire-after-access-secs", remove it. The final modified line should look like the following:
{ config = ${verylarge-long-lived}, name = "com.atlassian.confluence.pages.persistence.dao.PageDao.getPage" }
This should change the expiry of that particular cache to one day and will increase the maximum entries to 10,000.
- Restart Confluence.
For Confluence 5.8.13 and before:
- Extract the confluence-cache-ehcache-x.x.x.jar in your
ConfluenceInstallation/confluence/WEB-INF/lib
- Copy the ehcache.xml file and put it in
ConfluenceInstallation/confluence/WEB-INF/classes
(after that, remove all the extracted files from step 1) Look for this line:
<cache name="com.atlassian.confluence.pages.persistence.dao.PageDao.getPage()" maxEntriesLocalHeap="10000" eternal="false" timeToIdleSeconds="3600" timeToLiveSeconds="0" overflowToDisk="false" />
Change it to this:
<cache name="com.atlassian.confluence.pages.persistence.dao.PageDao.getPage()" maxEntriesLocalHeap="10000" eternal="false" timeToIdleSeconds="86400" timeToLiveSeconds="0" overflowToDisk="false" />
(
timeToIdleSeconds
changed to 86400)- Restart Confluence.
This should change the expiry of the cache to 1 day