myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leonardo Uribe (Resolved) (JIRA)" <>
Subject [jira] [Resolved] (MYFACES-3486) [perf] cache Factories to prevent unnecessary FactoryFinder.getFactory() calls
Date Sat, 03 Mar 2012 16:55:57 GMT


Leonardo Uribe resolved MYFACES-3486.

       Resolution: Fixed
    Fix Version/s: 2.1.7
> [perf] cache Factories to prevent unnecessary FactoryFinder.getFactory() calls
> ------------------------------------------------------------------------------
>                 Key: MYFACES-3486
>                 URL:
>             Project: MyFaces Core
>          Issue Type: Improvement
>          Components: JSR-314
>            Reporter: Leonardo Uribe
>            Assignee: Leonardo Uribe
>             Fix For: 2.0.13, 2.1.7
> FactoryFinder.getFactory() contains some synchronized blocks. The code is fast enough,
but it could be good to prevent those calls if is not really necessary. 
> Checking this stuff I had an idea about how to prevent those calls. The idea is call
FactoryFinder.getFactory() in the factory itself, and then pass the factory as a param for
the object that uses it (FacesContext or PartialViewContext or whatever). Also, we can replace
VisitContext.createVisitContext with calling the factory and then getVisitContext() directly
(note createVisitContext is an static method thought for users). Additionally, add some volatile
variables in some places to prevent multiple initializations is a good idea too.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message