[jira] [Comment Edited] (MYFACES-3789) Change default refresh period for facelets from 2 to 0 sec (=always refresh)
[ https://issues.apache.org/jira/browse/MYFACES-3789?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16886111#comment-16886111 ] Thomas Andraschko edited comment on MYFACES-3789 at 7/16/19 1:36 PM: - JFYI: this is a big performance drop for the development stage. -1 is the default for production, 0 for development stage now. This means that the xhtml is compiled on EVERY REQUEST instead of checking the last modified. Setting it to "1" means that it's recompiled after 1 second && xhtml has been modified. compared response times: production mode (-1): ~40ms dev mode (0): ~400ms dev mode (1): ~200ms a good solution is to set -1 in the web.xml and add a ServletListener: {code:java} @Override public void contextInitialized(ServletContextEvent sce) { ServletContext ctx = sce.getServletContext(); String projectStage = ctx.getInitParameter("javax.faces.PROJECT_STAGE"); boolean developmentProjectStage = projectStage == null || projectStage.equalsIgnoreCase(ProjectStage.Development.name()); if (developmentProjectStage) { // 1 means that JSF checks the last-modified of xhtmls every 1 seconds // the default (0) never checks for last-modified and always parses the xhtml, which leads to bad performance ctx.setInitParameter("javax.faces.FACELETS_REFRESH_PERIOD", "1"); } } {code} was (Author: tandraschko): JFYI: this is a big performance drop for the development stage. -1 is the default for production, 0 for development stage now. This means that the xhtml is compiled on EVERY REQUEST instead of checking the last modified. Setting it to "1" means that it's recompiled after 1 second && xhtml has been modified. compared response times: production mode (-1): ~40ms dev mode (0): ~400ms dev mode (1): ~200ms a good solution is to set -1 in the web.xml and add a ServletListener: {code:java} @Override public void contextInitialized(ServletContextEvent sce) { ServletContext ctx = sce.getServletContext(); String projectStage = ctx.getInitParameter("javax.faces.PROJECT_STAGE"); boolean developmentProjectStage = projectStage == null || projectStage.equalsIgnoreCase(ProjectStage.Development.name()); if (developmentProjectStage) { // 2 means that JSF checks the last-modified of xhtmls every 2 seconds // the default (0) never checks for last-modified and always parses the xhtml, which leads to bad performance ctx.setInitParameter("javax.faces.FACELETS_REFRESH_PERIOD", "1"); } } {code} > Change default refresh period for facelets from 2 to 0 sec (=always refresh) > > > Key: MYFACES-3789 > URL: https://issues.apache.org/jira/browse/MYFACES-3789 > Project: MyFaces Core > Issue Type: Wish >Reporter: Martin Kočí >Assignee: Leonardo Uribe >Priority: Trivial > Fix For: 2.2.5 > > Attachments: MYFACES-3789.patch > > > A typical developer works as follows > 1) edits a facelets view (template, composite component) > 2) CTRL +S > 3) refresh in browser (or LiveReload) > but: from 2) to 3) takes it sometimes less as 2 secs and the programmer must > repeat the 3) > We can override this behaviour with context-param: > javax.faces.FACELETS_REFRESH_PERIOD=0 > but then is for development neccesary: > javax.faces.PROJECT_STAGE=Development > javax.faces.FACELETS_REFRESH_PERIOD=0 > and for Production: > javax.faces.PROJECT_STAGE=Production > javax.faces.FACELETS_REFRESH_PERIOD=-1 > that means a configuration of 2 params instead of one (ProjectStage) (the > problem is: javax.faces.FACELETS_REFRESH_PERIOD when not default always wins > and PROJECT_STAGE=Production doesn't set FACELETS_REFRESH_PERIOD to -1) > with default refresh period = 0 makes the method > FaceletCacheFactoryImpl.getFaceletCache() the job and only > javax.faces.PROJECT_STAGE=Production is necessary. > Does anybody know why is the default 2 seconds ? -- This message was sent by Atlassian JIRA (v7.6.14#76016)
[jira] [Commented] (MYFACES-3789) Change default refresh period for facelets from 2 to 0 sec (=always refresh)
[ https://issues.apache.org/jira/browse/MYFACES-3789?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16886111#comment-16886111 ] Thomas Andraschko commented on MYFACES-3789: JFYI: this is a big performance drop for the development stage. -1 is the default for production, 0 for development stage now. This means that the xhtml is compiled on EVERY REQUEST instead of checking the last modified. Setting it to "1" means that it's recompiled after 1 second && xhtml has been modified. compared response times: production mode (-1): ~40ms dev mode (0): ~400ms dev mode (1): ~200ms a goodl solution is to set -1 in the web.xml and add a ServletListener: {code:java} @Override public void contextInitialized(ServletContextEvent sce) { ServletContext ctx = sce.getServletContext(); String projectStage = ctx.getInitParameter("javax.faces.PROJECT_STAGE"); boolean developmentProjectStage = projectStage == null || projectStage.equalsIgnoreCase(ProjectStage.Development.name()); if (developmentProjectStage) { // 2 means that JSF checks the last-modified of xhtmls every 2 seconds // the default (0) never checks for last-modified and always parses the xhtml, which leads to bad performance ctx.setInitParameter("javax.faces.FACELETS_REFRESH_PERIOD", "1"); } } {code} > Change default refresh period for facelets from 2 to 0 sec (=always refresh) > > > Key: MYFACES-3789 > URL: https://issues.apache.org/jira/browse/MYFACES-3789 > Project: MyFaces Core > Issue Type: Wish >Reporter: Martin Kočí >Assignee: Leonardo Uribe >Priority: Trivial > Fix For: 2.2.5 > > Attachments: MYFACES-3789.patch > > > A typical developer works as follows > 1) edits a facelets view (template, composite component) > 2) CTRL +S > 3) refresh in browser (or LiveReload) > but: from 2) to 3) takes it sometimes less as 2 secs and the programmer must > repeat the 3) > We can override this behaviour with context-param: > javax.faces.FACELETS_REFRESH_PERIOD=0 > but then is for development neccesary: > javax.faces.PROJECT_STAGE=Development > javax.faces.FACELETS_REFRESH_PERIOD=0 > and for Production: > javax.faces.PROJECT_STAGE=Production > javax.faces.FACELETS_REFRESH_PERIOD=-1 > that means a configuration of 2 params instead of one (ProjectStage) (the > problem is: javax.faces.FACELETS_REFRESH_PERIOD when not default always wins > and PROJECT_STAGE=Production doesn't set FACELETS_REFRESH_PERIOD to -1) > with default refresh period = 0 makes the method > FaceletCacheFactoryImpl.getFaceletCache() the job and only > javax.faces.PROJECT_STAGE=Production is necessary. > Does anybody know why is the default 2 seconds ? -- This message was sent by Atlassian JIRA (v7.6.14#76016)
[jira] [Comment Edited] (MYFACES-3789) Change default refresh period for facelets from 2 to 0 sec (=always refresh)
[ https://issues.apache.org/jira/browse/MYFACES-3789?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16886111#comment-16886111 ] Thomas Andraschko edited comment on MYFACES-3789 at 7/16/19 1:31 PM: - JFYI: this is a big performance drop for the development stage. -1 is the default for production, 0 for development stage now. This means that the xhtml is compiled on EVERY REQUEST instead of checking the last modified. Setting it to "1" means that it's recompiled after 1 second && xhtml has been modified. compared response times: production mode (-1): ~40ms dev mode (0): ~400ms dev mode (1): ~200ms a good solution is to set -1 in the web.xml and add a ServletListener: {code:java} @Override public void contextInitialized(ServletContextEvent sce) { ServletContext ctx = sce.getServletContext(); String projectStage = ctx.getInitParameter("javax.faces.PROJECT_STAGE"); boolean developmentProjectStage = projectStage == null || projectStage.equalsIgnoreCase(ProjectStage.Development.name()); if (developmentProjectStage) { // 2 means that JSF checks the last-modified of xhtmls every 2 seconds // the default (0) never checks for last-modified and always parses the xhtml, which leads to bad performance ctx.setInitParameter("javax.faces.FACELETS_REFRESH_PERIOD", "1"); } } {code} was (Author: tandraschko): JFYI: this is a big performance drop for the development stage. -1 is the default for production, 0 for development stage now. This means that the xhtml is compiled on EVERY REQUEST instead of checking the last modified. Setting it to "1" means that it's recompiled after 1 second && xhtml has been modified. compared response times: production mode (-1): ~40ms dev mode (0): ~400ms dev mode (1): ~200ms a goodl solution is to set -1 in the web.xml and add a ServletListener: {code:java} @Override public void contextInitialized(ServletContextEvent sce) { ServletContext ctx = sce.getServletContext(); String projectStage = ctx.getInitParameter("javax.faces.PROJECT_STAGE"); boolean developmentProjectStage = projectStage == null || projectStage.equalsIgnoreCase(ProjectStage.Development.name()); if (developmentProjectStage) { // 2 means that JSF checks the last-modified of xhtmls every 2 seconds // the default (0) never checks for last-modified and always parses the xhtml, which leads to bad performance ctx.setInitParameter("javax.faces.FACELETS_REFRESH_PERIOD", "1"); } } {code} > Change default refresh period for facelets from 2 to 0 sec (=always refresh) > > > Key: MYFACES-3789 > URL: https://issues.apache.org/jira/browse/MYFACES-3789 > Project: MyFaces Core > Issue Type: Wish >Reporter: Martin Kočí >Assignee: Leonardo Uribe >Priority: Trivial > Fix For: 2.2.5 > > Attachments: MYFACES-3789.patch > > > A typical developer works as follows > 1) edits a facelets view (template, composite component) > 2) CTRL +S > 3) refresh in browser (or LiveReload) > but: from 2) to 3) takes it sometimes less as 2 secs and the programmer must > repeat the 3) > We can override this behaviour with context-param: > javax.faces.FACELETS_REFRESH_PERIOD=0 > but then is for development neccesary: > javax.faces.PROJECT_STAGE=Development > javax.faces.FACELETS_REFRESH_PERIOD=0 > and for Production: > javax.faces.PROJECT_STAGE=Production > javax.faces.FACELETS_REFRESH_PERIOD=-1 > that means a configuration of 2 params instead of one (ProjectStage) (the > problem is: javax.faces.FACELETS_REFRESH_PERIOD when not default always wins > and PROJECT_STAGE=Production doesn't set FACELETS_REFRESH_PERIOD to -1) > with default refresh period = 0 makes the method > FaceletCacheFactoryImpl.getFaceletCache() the job and only > javax.faces.PROJECT_STAGE=Production is necessary. > Does anybody know why is the default 2 seconds ? -- This message was sent by Atlassian JIRA (v7.6.14#76016)
[jira] [Resolved] (MYFACES-4296) [perf] use DateTimeFormatter instead SimpleDateFormat and cache it
[ https://issues.apache.org/jira/browse/MYFACES-4296?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Thomas Andraschko resolved MYFACES-4296. Resolution: Fixed > [perf] use DateTimeFormatter instead SimpleDateFormat and cache it > -- > > Key: MYFACES-4296 > URL: https://issues.apache.org/jira/browse/MYFACES-4296 > Project: MyFaces Core > Issue Type: Improvement >Affects Versions: 3.0.0-SNAPSHOT >Reporter: Thomas Andraschko >Assignee: Thomas Andraschko >Priority: Major > -- This message was sent by Atlassian JIRA (v7.6.14#76016)
[jira] [Created] (MYFACES-4296) [perf] use DateTimeFormatter instead SimpleDateFormat and cache it
Thomas Andraschko created MYFACES-4296: -- Summary: [perf] use DateTimeFormatter instead SimpleDateFormat and cache it Key: MYFACES-4296 URL: https://issues.apache.org/jira/browse/MYFACES-4296 Project: MyFaces Core Issue Type: Improvement Affects Versions: 3.0.0-SNAPSHOT Reporter: Thomas Andraschko Assignee: Thomas Andraschko -- This message was sent by Atlassian JIRA (v7.6.14#76016)
[jira] [Resolved] (TOBAGO-1996) Delete and arrow keys doesn't work properly on tc:date
[ https://issues.apache.org/jira/browse/TOBAGO-1996?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Henning Noeth resolved TOBAGO-1996. --- Resolution: Fixed > Delete and arrow keys doesn't work properly on tc:date > -- > > Key: TOBAGO-1996 > URL: https://issues.apache.org/jira/browse/TOBAGO-1996 > Project: MyFaces Tobago > Issue Type: Bug > Components: Themes >Affects Versions: 4.4.1 >Reporter: Henning Noeth >Assignee: Henning Noeth >Priority: Major > Fix For: 4.4.2, 5.0.0 > > > There are several issues with keys for tc:date. > The first time a tc:date is focused, the arrow keys 'left' and 'right' > doesn't work. > The DEL key remove the complete date. > Expected behavor: > Arrow keys move the cursor and DEL remove selected string or remove character > right from the cursor. > After the datetimepicker widget is closed by ESC or ENTER the widget cannot > reopened by down-arrow key. -- This message was sent by Atlassian JIRA (v7.6.14#76016)
[jira] [Commented] (TOBAGO-1996) Delete and arrow keys doesn't work properly on tc:date
[ https://issues.apache.org/jira/browse/TOBAGO-1996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16885944#comment-16885944 ] Henning Noeth commented on TOBAGO-1996: --- Build for Tobago 5.0.0 successful https://builds.apache.org/job/Tobago%20Trunk/1761/ > Delete and arrow keys doesn't work properly on tc:date > -- > > Key: TOBAGO-1996 > URL: https://issues.apache.org/jira/browse/TOBAGO-1996 > Project: MyFaces Tobago > Issue Type: Bug > Components: Themes >Affects Versions: 4.4.1 >Reporter: Henning Noeth >Assignee: Henning Noeth >Priority: Major > Fix For: 4.4.2 > > > There are several issues with keys for tc:date. > The first time a tc:date is focused, the arrow keys 'left' and 'right' > doesn't work. > The DEL key remove the complete date. > Expected behavor: > Arrow keys move the cursor and DEL remove selected string or remove character > right from the cursor. > After the datetimepicker widget is closed by ESC or ENTER the widget cannot > reopened by down-arrow key. -- This message was sent by Atlassian JIRA (v7.6.14#76016)