Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Reduce server side clutter  RSS feed

 
Ryan Fernandes
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Quick question:

Panel grids and panel groups are used for making the page look neat. They render the html tags for tables and cells.

However, .. this is something I dont want on my server side (in the jsf component tree) as it is pretty useless and is just wasting my RAM and CPU.

I have a rather large form to display and my graphic designer has gone and used panelgrids and groups quite liberally.

Any suggestions as to how to get around this?

Cheers.
 
Himanshu Gupta
Ranch Hand
Posts: 598
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think this link can sole your problem.

http://cagataycivici.wordpress.com/2006/06/27/jsf_state_saving_best_of/
 
Himanshu Gupta
Ranch Hand
Posts: 598
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the web.xml give this

 
Tim Holloway
Bartender
Posts: 18662
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are 2 problems with pushing the "clutter" client-side. First, it's a LOT of extra data that ends up traveling back and forth over the network, so you're shifting the work around, not actually saving work.

Secondly, anything that goes out to the client is potentially hackable.

If you're actually experiencing resource problems, it might help, but I don't recommend doing it just because keeping all that junk server-side is esthetically offensive.

The JSF component tree is elaborate, but it's also ephemeral. While it does make demands on the server, it's not quite the same as building massive trees of session-scope objects.
 
Tim Holloway
Bartender
Posts: 18662
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just as a side note, it occurs to me that a JSF component tree is still more abstract and compact than the HTML it produces. So it all may be relative. Only by measurement will you know how much it's costing you.
 
Ryan Fernandes
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSF component tree is still more abstract and compact than the HTML

Thanks Tim,

Thats exactly what I think too.
However, I've got a cluster of 4 app servers on 4 jvms running about 3 applications. The load is around 3500 users with around 40-55% recorded concurrency (POS applications).

The jvms are tuned, the apps are tuned (squeezed).. the sizing was done with a struts based app in mind... and the company turned around on us and stuck JSF in our stack.

Get the picture right? Sizing for JSF based apps is, IMHO, just not the same as doing it for Struts based apps.

3500 logged in users with 50% concurrency and I dont have patience with panel grids and groups eating my already squeezed resources.

Thanks for the help anyway.. I guess I'm stuck...

how about the "verbatim" tag to render those tables?

Cheers
 
Kavitha Govindaraj
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try this if you are using myfaces in web.xml. This works only if state_saving_method = "client"

org.apache.myfaces.COMPRESS_STATE_IN_CLIENT = "true" This compresses the HTML Response
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!