File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes Omit part of the view tree Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Omit part of the view tree" Watch "Omit part of the view tree" New topic
Author

Omit part of the view tree

Anne Buit
Greenhorn

Joined: Feb 21, 2009
Posts: 5
Hello,

I'm developing an application using dynamic JSF. Our application has only one page, so only one view per user. This page contains everything, the dom structure is built dynamically etc. We use Java to modify, subclass and write the JSF components and their children.

However, due to the richness of our application, we are running into a bottleneck.
The serialized view itself is very small, and is stored server-sided. However, during Phase 1 of the JSF lifecycle, the entire view is restored into java objects. This results in thousands of java objects, active during the JSF Lifecycle, which might be just a few miliseconds, only to be deallocated shortly after.

Using Ajax, some phases can be skipped using attributes like 'immediate'. However, I do not know of a way to omit a part of the view. For instance, when I do a server request to perform a validation on a field, I don't need the whole application to be restored. 20.000 java objects are not an exception. 500 java objects to garbage collect instead of 20.000 would greatly improve our performance. I asked at the RichFaces forum, but to no avail.

Summary: Is there any way to limit the size of the view tree during Phase 1 of the JSF LifeCycle?
Anne Buit
Greenhorn

Joined: Feb 21, 2009
Posts: 5
Is there anyone who has anything to say about this, or am I the only one who thinks this is an issue? Any feedback would be greatly appriciated.
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
Honestly said, I would share this approach under "bad design". Bad designs can only be solved by another design approach. Why only one view? Consider page includes or page fragments. Facelets may be very useful in this: https://facelets.dev.java.net/nonav/docs/dev/docbook.html
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Omit part of the view tree
 
Similar Threads
Scope/Life cycle of UIComponent tree on the server side
JSF 1.1 vs. JSF 1.2
CommandLink Vs OutputLink in JSF
Where is FacesContextFactory instance stored ?
Recursive Composite Component