• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Reduce server side clutter

 
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 598
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In the web.xml give this

 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Pay attention! Tiny ad!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic