Uploaded image for project: 'RichFaces'
  1. RichFaces
  2. RF-11000

Hit miss for class loader cost performance problem in Richfaces 4.1.0.

    Details

    • Estimated Difficulty:
      Medium

      Description

      There are scenarios when resources are retrieved during no partial
      request processing:

      1. JSF html renderer (such as ScriptRenderer from faces) require to
        know resources names to include them to html/head,
      2. Resources content request.

      We have two types of resources: dynamic and static. Predefined dynamic
      resources (such as StateHolderResource) are read using class loader as
      they are java classes. Static resources are kept in resources folder
      as part of richfaces release jars (jquery.js, richfaces.js, etc).
      There is a special case with compiled css that is consider as dynamic
      resources but is not important in our case.

      The problem appears when we try to load static resources using dynamic
      loader. This make unnecessary lookup in java class loader space which
      cost time and of course we miss the call as static resources not
      exists there.

      Statistics that shows class loader hits for every richfaces/ajax4jsf no partial request that will be eliminated after patch:

      Resource::jquery.js                  ::loading::timens:: 558000 ns::timems::0.558 ms::all::1.561496 sec
      Resource::richfaces.js               ::loading::timens:: 490000 ns::timems::0.490 ms::all::1.561986 sec
      Resource::richfaces-base-component.js::loading::timens:: 593000 ns::timems::0.593 ms::all::1.563672 sec
      Resource::richfaces-queue.js         ::loading::timens:: 672000 ns::timems::0.672 ms::all::1.564350 sec
      Resource::richfaces-event.js         ::loading::timens::3292000 ns::timems::3.292 ms::all::1.569386 sec
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                bleathem Brian Leathem
                Reporter:
                paweljurski Pawel J.
              • Votes:
                4 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - 1 hour
                  1h
                  Remaining:
                  Remaining Estimate - 1 hour
                  1h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified