Insights into Java Server Faces

2009/07/22

Reduce server side state size with JSF 1.2 and Facelets by 30-60%

Filed under: JSF — Tags: , — Hanspeter @ 13:21

Beside his appointments at Jazoon 2009 we had the opportunity to have Ed Burns at our office in Credit Suisse (CS) to work on some suggenstions regarding JSF improvements. After a short discussion it was agreed that there is only one point to look at on the currently used JSF 1.2 and Facelets – the other improvements will most likely be covered by JSF 2.0 or would have to be looked into later.

Ed Burns and me pair-programming the investigative changes
Ed Burns and me pair-programming the investigative changes.
Poken_Gabriel: notice my Poken in the lower left corner 😉

The suggestion actually came from Martin Marinschek:

  • Beneath the component’s state, JSF also stores all ValueExpressions to the state. Since we are using Facelets and while building the view all templates are processed by Facelets anyway, we would not need to store the ValueExpressions but could just recreate them while the component tree is rebuilt.

Now the task was to find out how much the state size would be reduced by not storing the value bindings to the state. Once it was running we where surprised to see a very good potential to reduce the saved state size by 30-60+ % depending on the number of expressions used on the page. Finally we filed the findings and the code changes as an issue to https://java.net/jira/browse/JAVASERVERFACES-1176.

So for all out there using JSF that also had some state size issues – there will be a solution available, but unfortanytely only for the ones using Facelets too, because with that we will rely on the combination of JSF 1.2 and Facelets.

Advertisements

1 Comment »

  1. I’m really psyched to get this change in!

    Comment by Ed Burns — 2009/07/27 @ 15:49


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: