Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-3572

[perf] remember initial state for properties changed in normal JSF lifecycle

Agile BoardAttach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.0.15, 2.1.9
    • JSR-314
    • None

    Description

      There are 4 component properties that are very special in JSF:

      value
      localValueSet
      valid
      submittedValue

      These ones are used intensively over JSF lifecycle. By performance reasons, PSS algorithm does not save the initial state of a component and instead, just mark the properties that were changed from its initial state and save them in the delta state. This reduce the required memory for a component and also reduce the necessary calculations to derive the delta.

      But since these 4 properties are used intensively, it is worth to calculate the initial state and store it into the StateHelper. Later, we can use that information in StateHelper.saveState(), to remove from delta the values that are not necessary to save, because are the same ones from the initial state. We only need to add some lines into UIInput.markInitialState(), which is reasonable.

      The result of this change is an important reduction over state size generated by input components. If validation is successful, the input component will not generate state, and if the validation fails, only the components with some value to save will store something into the state.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            lu4242 Leonardo Uribe
            lu4242 Leonardo Uribe
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment