[jira] [Updated] (MYFACES-4042) Improve startup time by skipping classpath jar scan for *.faces-config.xml

2016-04-04 Thread Bill Lucy (JIRA)

 [ 
https://issues.apache.org/jira/browse/MYFACES-4042?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bill Lucy updated MYFACES-4042:
---
Status: Patch Available  (was: Open)

> Improve startup time by skipping classpath jar scan for *.faces-config.xml
> --
>
> Key: MYFACES-4042
> URL: https://issues.apache.org/jira/browse/MYFACES-4042
> Project: MyFaces Core
>  Issue Type: Improvement
>Affects Versions: 2.1.18, 2.2.9
> Environment: WebSphere
>Reporter: Bill Lucy
>Priority: Minor
> Attachments: MYFACES-4042.patch
>
>
> In version 2.1 org.apache.myfaces.ee6.MyFacesContainerInitializer was updated 
> to scan for faces-config.xml resources in applications JARs during startup, 
> as part of the process to add a FacesConfig in onStartup().  This is a very 
> expensive scan, since we have to iterate over every file in every jar on the 
> app classpath.  
> This scan is not completely necessary: in the spec we have:
> Section 11.4.2 “Application Startup Behavior”
> Implementations may check for the presence of a servlet-class definition of 
> class javax.faces.webapp.FacesServlet in the web application deployment 
> descriptor as a means to abort the configuration process and reduce startup 
> time for applications that do not use JavaServer Faces Technology.
> Which I interpret to mean that skipping checking the app jars at init time - 
> for the purpose of adding a dynamic FacesServlet - is valid.  Given the 
> performance hit for the scan, I think adding a context param to disable the 
> scan would be worthwhile.  Something like:
> org.apache.myfaces.INITIALIZE_SKIP_JAR_FACES_CONFIG_SCAN
> Would this be worthwhile for others?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (MYFACES-4042) Improve startup time by skipping classpath jar scan for *.faces-config.xml

2016-04-04 Thread Leonardo Uribe (JIRA)

 [ 
https://issues.apache.org/jira/browse/MYFACES-4042?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Leonardo Uribe updated MYFACES-4042:

   Resolution: Fixed
 Assignee: Leonardo Uribe
Fix Version/s: 2.2.10
   Status: Resolved  (was: Patch Available)

I have committed a modified version of the patch, adding some documentation and 
also including the check for a system property is the one in web.xml is not 
set. Thanks to Bill Lucy for provide this patch.

> Improve startup time by skipping classpath jar scan for *.faces-config.xml
> --
>
> Key: MYFACES-4042
> URL: https://issues.apache.org/jira/browse/MYFACES-4042
> Project: MyFaces Core
>  Issue Type: Improvement
>Affects Versions: 2.1.18, 2.2.9
> Environment: WebSphere
>Reporter: Bill Lucy
>Assignee: Leonardo Uribe
>Priority: Minor
> Fix For: 2.2.10
>
> Attachments: MYFACES-4042.patch
>
>
> In version 2.1 org.apache.myfaces.ee6.MyFacesContainerInitializer was updated 
> to scan for faces-config.xml resources in applications JARs during startup, 
> as part of the process to add a FacesConfig in onStartup().  This is a very 
> expensive scan, since we have to iterate over every file in every jar on the 
> app classpath.  
> This scan is not completely necessary: in the spec we have:
> Section 11.4.2 “Application Startup Behavior”
> Implementations may check for the presence of a servlet-class definition of 
> class javax.faces.webapp.FacesServlet in the web application deployment 
> descriptor as a means to abort the configuration process and reduce startup 
> time for applications that do not use JavaServer Faces Technology.
> Which I interpret to mean that skipping checking the app jars at init time - 
> for the purpose of adding a dynamic FacesServlet - is valid.  Given the 
> performance hit for the scan, I think adding a context param to disable the 
> scan would be worthwhile.  Something like:
> org.apache.myfaces.INITIALIZE_SKIP_JAR_FACES_CONFIG_SCAN
> Would this be worthwhile for others?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)