Kuali Rice Development
  1. Kuali Rice Development
  2. KULRICE-12991

Application startup time slow after Spring 4.0.x upgrade

    Details

    • Type: Bug Fix Bug Fix
    • Status: Closed Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.5
    • Fix Version/s: 2.6
    • Component/s: Development
    • Security Level: Public (Public: Anyone can view)
    • Labels:
    • 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-8929KRAD rederning is slow due to Freemarker's FMParser initializing LookaheadSuccess multiple times
      KULRICE-3211Upgrade to Spring 3.0.1
      KULRICE-11635Analyze upgrade to Spring 4.x
      KULRICE-6724Override Spring class to improve startup performance
      KULRICE-4418cxf upgrade causes incorrect spring version to be brought in in client applications.
      KULRICE-2294Combine Rice Spring Contexts into a single Spring context
    • 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?:
      Yes
    • Story Points:
      5

      Description

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

      DataDictionary.java
      generateMissingInquiryDefinitions();
      generateMissingLookupDefinitions();
      

      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

      ddBeans.getBeansOfType(InquiryView.class).values();
      

      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.

        Issue Links

          Activity

          Hide
          Eric Westfall added a comment -

          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.

          Show
          Eric Westfall added a comment - 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.
          Hide
          Brian Smith (Inactive) added a comment -

          KRAD Sample-app without spring 4
          54,359 ms
          59,040
          58,639
          57,850
          or approx. 1 min

          KRAD Sample-app with spring 4
          113,415
          111,280
          111,443
          or approx. 2 min

          KC with rice 2.5
          110,055
          114,765
          113,995
          or approx. 2 min

          KC with rice 2.6
          292,959
          296,836
          300,871
          or approx. 5 min

          Show
          Brian Smith (Inactive) added a comment - KRAD Sample-app without spring 4 54,359 ms 59,040 58,639 57,850 or approx. 1 min KRAD Sample-app with spring 4 113,415 111,280 111,443 or approx. 2 min KC with rice 2.5 110,055 114,765 113,995 or approx. 2 min KC with rice 2.6 292,959 296,836 300,871 or approx. 5 min
          Hide
          Brian Smith (Inactive) added a comment -

          Major 3.5 minute slowdown occurs somewhere in here:

          2015-02-18 17:34:43,567 [RMI TCP Connection(3)-127.0.0.1] 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)-127.0.0.1] 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]

          Show
          Brian Smith (Inactive) added a comment - Major 3.5 minute slowdown occurs somewhere in here: 2015-02-18 17:34:43,567 [RMI TCP Connection(3)-127.0.0.1] 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)-127.0.0.1] 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]
          Hide
          Brian Smith (Inactive) added a comment - - edited

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

          Show
          Brian Smith (Inactive) added a comment - - edited Krad sample app iterates over and gets 5000 beans vs KC iterates over and gets 19000 beans in DefaultListableBeanFactory.preInstantiateSingletons
          Hide
          Brian Smith (Inactive) added a comment -
          Show
          Brian Smith (Inactive) added a comment - Related spring jira https://jira.spring.io/browse/SPR-8767
          Hide
          Brian Smith (Inactive) added a comment -

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

          Show
          Brian Smith (Inactive) added a comment - A flag was added to turn off initializing these beans at start up. By default they are not initialized.

            People

            • Assignee:
              Brian Smith (Inactive)
              Reporter:
              Kristina Taylor (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Agile

                  Structure Helper Panel