javaserverfaces
  1. javaserverfaces
  2. JAVASERVERFACES-1536

Performance problem in ApplicationImpl.createComponent(FacesContext context, Resource componentResource)

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.2
    • Fix Version/s: 2.0.3-b01
    • Component/s: facelets
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      1,536

      Description

      The following method has a performance problem (build 2.0.2-b10):

      public UIComponent createComponent(FacesContext context, Resource
      componentResource) throws FacesException

      In line 976 the class loader is called, which is quite expensive. If you make
      heavy use of composite components, the performance decreases dramatically under
      heavy load because the class loader is synchronized.

      You should remember that you already looked for a class and didn't find it. You
      could simply map an inner class (e.g. ComponentNotFound) to the class name in
      the component map.

        Activity

        Hide
        Ryan Lubke added a comment -

        Target 2.0.3.

        Thanks for the report.

        Show
        Ryan Lubke added a comment - Target 2.0.3. Thanks for the report.
        Hide
        Ryan Lubke added a comment -

        So we could probably doing something along the lines of the suggested fix when
        ProjectStage is not Development. This would mean that in any other stages, a
        compcomp added after it had been initially looked up still wouldn't be found.

        Show
        Ryan Lubke added a comment - So we could probably doing something along the lines of the suggested fix when ProjectStage is not Development. This would mean that in any other stages, a compcomp added after it had been initially looked up still wouldn't be found.
        Hide
        Ryan Lubke added a comment -

        Created an attachment (id=1097)
        Proposed changes (version 1)

        Show
        Ryan Lubke added a comment - Created an attachment (id=1097) Proposed changes (version 1)
        Hide
        rogerk added a comment -

        r=rogerk

        Show
        rogerk added a comment - r=rogerk
        Hide
        Ryan Lubke added a comment -

        Changes applied (r8311).

        Show
        Ryan Lubke added a comment - Changes applied (r8311).
        Hide
        Frank Caputo added a comment -

        Ryan,

        how can one add a class in any other ProjectStage than Development?

        Show
        Frank Caputo added a comment - Ryan, how can one add a class in any other ProjectStage than Development?
        Hide
        Ryan Lubke added a comment -

        Groovy scripts could be added.

        Show
        Ryan Lubke added a comment - Groovy scripts could be added.
        Hide
        Frank Caputo added a comment -

        I thought groovy scripts are handled by createComponentFromScriptResource.

        Show
        Frank Caputo added a comment - I thought groovy scripts are handled by createComponentFromScriptResource.
        Hide
        Manfred Riem added a comment -

        Closing out resolved issue

        Show
        Manfred Riem added a comment - Closing out resolved issue

          People

          • Assignee:
            Ryan Lubke
            Reporter:
            Frank Caputo
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: