ICEfaces
  1. ICEfaces
  2. ICE-9062

First load of app on server startup takes a considerable amount of time

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Invalid
    • Affects Version/s: EE-3.2.0.GA
    • Fix Version/s: EE-3.3.0.GA
    • Component/s: Bridge, Framework
    • Labels:
      None
    • Environment:
      All
    • Assignee Priority:
      P3

      Description

      With the EE 3.2.0 release, the very first load an application takes much more time than subsequent loads. This happens after a server has been started or re-started.
      1. Case11826Example3.zip
        23 kB
        Arran Mccullough

        Activity

        Hide
        Ted Goddard added a comment -

        Mircea, is there part of resource ordering that might lead to a large amount of disk activity?

        Show
        Ted Goddard added a comment - Mircea, is there part of resource ordering that might lead to a large amount of disk activity?
        Hide
        Mircea Toma added a comment -

        I do not believe there is. Resource ordering is reading a few resource-dependency.xml files that is all. They are already available in the classpath.

        Show
        Mircea Toma added a comment - I do not believe there is. Resource ordering is reading a few resource-dependency.xml files that is all. They are already available in the classpath.
        Hide
        Mircea Toma added a comment - - edited

        Test 1

        trunk non-EE - loaded first
        Time taken by phase id --> RESTORE_VIEW 1 in MS. 92
        Time taken by phase id --> RENDER_RESPONSE 6 in MS. 3515

        trunk EE - loaded second
        Time taken by phase id --> RESTORE_VIEW 1 in MS. 74
        Time taken by phase id --> RENDER_RESPONSE 6 in MS. 2225
        ----------
        Test 2

        trunk EE - loaded first
        Time taken by phase id --> RESTORE_VIEW 1 in MS. 69
        Time taken by phase id --> RENDER_RESPONSE 6 in MS. 2554

        trunk non-EE - loaded second
        Time taken by phase id --> RESTORE_VIEW 1 in MS. 63
        Time taken by phase id --> RENDER_RESPONSE 6 in MS. 1905
        ----------
        Test 3

        trunk non-EE - loaded first
        Time taken by phase id --> RESTORE_VIEW 1 in MS. 70
        Time taken by phase id --> RENDER_RESPONSE 6 in MS. 2091

        trunk EE - loaded second
        Time taken by phase id --> RESTORE_VIEW 1 in MS. 68
        Time taken by phase id --> RENDER_RESPONSE 6 in MS. 1871
        ----------
        Test 4

        trunk EE - loaded first
        Time taken by phase id --> RESTORE_VIEW 1 in MS. 69
        Time taken by phase id --> RENDER_RESPONSE 6 in MS. 2190

        trunk non-EE - loaded second
        Time taken by phase id --> RESTORE_VIEW 1 in MS. 84
        Time taken by phase id --> RENDER_RESPONSE 6 in MS. 1953
        -----------

        Show
        Mircea Toma added a comment - - edited Test 1 trunk non-EE - loaded first Time taken by phase id --> RESTORE_VIEW 1 in MS. 92 Time taken by phase id --> RENDER_RESPONSE 6 in MS. 3515 trunk EE - loaded second Time taken by phase id --> RESTORE_VIEW 1 in MS. 74 Time taken by phase id --> RENDER_RESPONSE 6 in MS. 2225 ---------- Test 2 trunk EE - loaded first Time taken by phase id --> RESTORE_VIEW 1 in MS. 69 Time taken by phase id --> RENDER_RESPONSE 6 in MS. 2554 trunk non-EE - loaded second Time taken by phase id --> RESTORE_VIEW 1 in MS. 63 Time taken by phase id --> RENDER_RESPONSE 6 in MS. 1905 ---------- Test 3 trunk non-EE - loaded first Time taken by phase id --> RESTORE_VIEW 1 in MS. 70 Time taken by phase id --> RENDER_RESPONSE 6 in MS. 2091 trunk EE - loaded second Time taken by phase id --> RESTORE_VIEW 1 in MS. 68 Time taken by phase id --> RENDER_RESPONSE 6 in MS. 1871 ---------- Test 4 trunk EE - loaded first Time taken by phase id --> RESTORE_VIEW 1 in MS. 69 Time taken by phase id --> RENDER_RESPONSE 6 in MS. 2190 trunk non-EE - loaded second Time taken by phase id --> RESTORE_VIEW 1 in MS. 84 Time taken by phase id --> RENDER_RESPONSE 6 in MS. 1953 -----------
        Hide
        Mircea Toma added a comment -

        As you can see from the results above there is no difference for the execution time between the EE and non-EE versions. The only thing that seems to matter is the order in which the applications are accessed. Every time the application accessed first will run ~150ms slower then the second one. Most probably difference is due to classloading, the second app class loader does not need to load so many classes and resources anymore.

        The application server was restarted before each test was executed.

        Show
        Mircea Toma added a comment - As you can see from the results above there is no difference for the execution time between the EE and non-EE versions. The only thing that seems to matter is the order in which the applications are accessed. Every time the application accessed first will run ~150ms slower then the second one. Most probably difference is due to classloading, the second app class loader does not need to load so many classes and resources anymore. The application server was restarted before each test was executed.
        Hide
        Mircea Toma added a comment -

        Also ran YourKit profiler with both applications and could not detect any significant differences between them. The profiling results show that the majority of CPU time is used for loading the resources (the mandatory ones).

        Show
        Mircea Toma added a comment - Also ran YourKit profiler with both applications and could not detect any significant differences between them. The profiling results show that the majority of CPU time is used for loading the resources (the mandatory ones).

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Arran Mccullough
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: