[KULRICE-12991] Application startup time slow after Spring 4.0.x upgrade Created: 18/Jul/14  Updated: 30/Mar/15  Resolved: 17/Mar/15

Status: Closed
Project: Kuali Rice Development
Component/s: Development
Affects Version/s: 2.5
Fix Version/s: 2.6
Security Level: Public (Public: Anyone can view)

Type: Bug Fix Priority: Critical
Reporter: Kristina Taylor (Inactive) Assignee: Brian Smith (Inactive)
Resolution: Fixed Votes: 0
Labels: MidTerm
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
is related to KULRICE-12988 KC app startup time really slow with ... Closed
Similar issues:
KULRICE-12988KC app startup time really slow with the latest rice 2.5 revision
KULRICE-13070Pages load really slow after rice upgrade
KULRICE-531development slowness
KULRICE-3211Upgrade to Spring 3.0.1
KULRICE-6724Override Spring class to improve startup performance
KULRICE-11635Analyze upgrade to Spring 4.x
KULRICE-8929KRAD rederning is slow due to Freemarker's FMParser initializing LookaheadSuccess multiple times
KULRICE-4418cxf upgrade causes incorrect spring version to be brought in in client applications.
KULRICE-2294Combine Rice Spring Contexts into a single Spring context
KULRICE-6509Synchronize with remote services on KSB startup
Sprint: Rice Sprint 2015-02-18, Rice Sprint 2015-03-04, Rice Sprint 2015-03-18, Rice Sprint 2015-04-01
KAI Review Status: Not Required
KTI Review Status: Not Required
Code Review Status: Not Required
Include in Release Notes?:
Story Points: 5


KC reported KULRICE-12988 which indicated that the Spring 4.0.5 upgrade is very slow when fetching the views during


We added a workaround for KULRICE-12988 but still need to address the issue as to why this beta feature slowed down for this upgrade.

Specifically, it seems that the calls like


are the major holdup. Jerry noted that these have always been slow because we can't use the UIF index. We need to investigate why this is and how we can fix it so that startup times with a ton of views can be more efficient.

Comment by Eric Westfall [ 20/Jan/15 ]

Picking back up work on this, should do investigation to try and reproduce the issue of the slow startup with the original version of spring 4 we were using (in order to verify it's still an issue). Then see if upgrading to the latest spring 4 version helps. If not, see if there has been a bug reported with spring about it. If not, report a bug and try to provide a test case they can run.

Comment by Brian Smith (Inactive) [ 18/Feb/15 ]

KRAD Sample-app without spring 4
54,359 ms
or approx. 1 min

KRAD Sample-app with spring 4
or approx. 2 min

KC with rice 2.5
or approx. 2 min

KC with rice 2.6
or approx. 5 min

Comment by Brian Smith (Inactive) [ 18/Feb/15 ]

Major 3.5 minute slowdown occurs somewhere in here:

2015-02-18 17:34:43,567 [RMI TCP Connection(3)-] u:/d: INFO org.kuali.rice.krad.datadictionary.DefaultListableBeanFactory - Pre-instantiating singletons
[EL Info]: 2015-02-18 17:35:22.417-ServerSession(524237335)-EclipseLink, version: Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd
[EL Info]: 2015-02-18 17:35:22.422-ServerSession(524237335)-file:/F:/intellij-projects/kc/coeus-webapp/target/coeus-webapp-6.0.0-SNAPSHOT/WEB-INF/classes/_rice.kcb login successful
2015-02-18 17:38:15,547 [RMI TCP Connection(3)-] u:/d: INFO org.kuali.rice.krad.data.provider.impl.CompositeMetadataProviderImpl - Initializing Metadata from sources: [org.kuali.rice.krad.data.jpa.eclipselink.EclipseLinkJpaMetadataProviderImpl@474d3629, org.kuali.rice.krad.data.provider.annotation.impl.AnnotationMetadataProviderImpl@1e1ee251]

Comment by Brian Smith (Inactive) [ 18/Feb/15 ]

Krad sample app iterates over and gets 5000 beans
KC iterates over and gets 19000 beans
in DefaultListableBeanFactory.preInstantiateSingletons

Comment by Brian Smith (Inactive) [ 19/Feb/15 ]

Related spring jira https://jira.spring.io/browse/SPR-8767

Comment by Brian Smith (Inactive) [ 27/Feb/15 ]

A flag was added to turn off initializing these beans at start up. By default they are not initialized.

Generated at Mon Jun 01 11:04:29 CDT 2020 using JIRA 6.1.5#6160-sha1:a61a0fc278117a0da0ec9b89167b8f29b6afdab2.