myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Myfaces Wiki] Update of "GSoC2010_StateSavingPerformanceImprovements" by Marius Petoi
Date Tue, 06 Apr 2010 11:05:47 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Myfaces Wiki" for change notification.

The "GSoC2010_StateSavingPerformanceImprovements" page has been changed by Marius Petoi.
http://wiki.apache.org/myfaces/GSoC2010_StateSavingPerformanceImprovements?action=diff&rev1=13&rev2=14

--------------------------------------------------

  
  In JSF 2.0 there is the possibility to partially save the state of the page in the External''''''Context.
This means that at the first request the entire state is saved, but afterwards only the differences
from this are saved. MyFaces 2.0 introduces the “State''''''Management''''''Strategy”,
which is an interface for strategies used for saving and respectively loading the view. The
default MyFaces strategy implemented so far, upon saving the view checks whether there has
been a previously saved view. If so, it saves just the differences between the old state and
the new, actual state. If not, the entire state is saved in the external context request map.
  
- At the moment, the saved state contains the component tree together with properties for
each component (a list of its children and facets, together with the list of listeners, the
behaviours map, etc). Every component is responsible for creating its own “state” object,
which is afterwards included in the parent’s state object. In the end, the “state” of
the UI''''''View''''''Root and the tree of components is saved in the External''''''Context.
+ At the moment, the saved state contains the component tree together with properties for
each component (a list of its children and facets, together with the list of listeners, the
behaviours map, etc). Every component is responsible for creating its own “state” object,
which is afterwards included in the parent’s state object. In the end, the “state” of
the UI''''''View''''''Root and the tree of components is saved in the External''''''Context.
The actual state is written in the response by Response''''''Manager objects. The Response''''''Manager
used so far is the Html''''''Response''''''State''''''Manager, which writes to the response
the HTML code representing the actual saved state. Also, this manager object retrieves the
state from the external context, when a request is received.
  
- Upon restore, the UI''''''View''''''Root is constructed using the information stored in
the External''''''Context.
+ Upon restore, the UI''''''View''''''Root is constructed using the information stored in
the External''''''Context and using the existing UI''''''View''''''Root (the UI''''''View''''''Root
from the last request).
  
  This project is intended to take a deeper look into what exactly is saved at the moment.
The saved state should be analyzed and see whether anything can be skipped. For this, memory
profiling should be done and see which part of the saved state occupies the most memory. Afterwards,
we should see how much of this is really used and what can be dismissed.
  

Mime
View raw message