[ 
https://issues.apache.org/jira/browse/MYFACES-3789?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13998669#comment-13998669
 ] 

Leonardo Uribe commented on MYFACES-3789:
-----------------------------------------

Recently I have been checking this part of the code. In production it is 
already set to -1. So the change could be to change it from 2 to 0 in other 
modes by default. Fortunately there is nothing in the spec that defines that 
default value.

I have experienced in the past some bugs with this stuff, specially in some 
junit tests. That's the reason why I have hesitated with this issue. The case 
was to stop the debugger by some reason and let it continue. In some cases the 
tests failed, because the facelet was refreshed. If the value is 2, there is no 
chance for the algorithm to be refreshed in the junit test.

So the big question is if the algorithm is stable setting it to 0. In theory it 
shouldn't be a problem, but we need to try, because the algorithm that do the 
refresh is something that comes from facelets 1.1.x, and since it is something 
not for production environment, it could have some bugs (one recently found in 
MYFACES-3890). Let me check the whole algorithm, and if everything is ok I'll 
change it.

> 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čí
>            Priority: Trivial
>         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
(v6.2#6252)

Reply via email to