Issue Details (XML | Word | Printable)

Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Ryan Lubke
Reporter: Frank Caputo
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.

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

Created: 04/Feb/10 08:00 AM   Updated: 21/Mar/12 02:31 PM   Resolved: 11/Feb/10 12:43 AM
Component/s: facelets
Affects Version/s: 2.0.2
Fix Version/s: 2.0.3-b01

Time Tracking:
Not Specified

File Attachments: 1. Text File changebundle.txt (2 kB) 09/Feb/10 09:10 AM - Ryan Lubke


Operating System: All
Platform: All

Issuezilla Id: 1,536
Participants: Frank Caputo, Manfred Riem, rogerk and Ryan Lubke

 Description  « Hide

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.

Ryan Lubke added a comment - 04/Feb/10 08:32 AM

Target 2.0.3.

Thanks for the report.

Ryan Lubke added a comment - 08/Feb/10 02:56 PM

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.

Ryan Lubke added a comment - 09/Feb/10 09:10 AM

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

rogerk added a comment - 09/Feb/10 09:17 AM


Ryan Lubke added a comment - 09/Feb/10 09:19 AM

Changes applied (r8311).

Frank Caputo added a comment - 10/Feb/10 09:24 AM


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

Ryan Lubke added a comment - 10/Feb/10 09:32 AM

Groovy scripts could be added.

Frank Caputo added a comment - 11/Feb/10 12:43 AM

I thought groovy scripts are handled by createComponentFromScriptResource.

Manfred Riem added a comment - 21/Mar/12 02:31 PM

Closing out resolved issue