webtier@glassfish.java.net

Re: serious performance bug with JSF2

From: <webtier_at_javadesktop.org>
Date: Thu, 30 Sep 2010 06:20:08 PDT

You're not the first person to notice this - I'm sure it's not necessary. The key
point is to ensure that you don't do database lookups in the getter for the
property used in the datatable value=. In fact it should just be a standard
ide generated getter really. Whenever you change the underlying data the
property should be reloaded, then the getter can return the updated data
from memory.

I have made the point that it's far from obvious that it works like this. When I
first experimenting with h:dataTable I looked at the value=, and though ok
I'll write a getter that retrieves the data from the database. It was only during
a debug session that I figured out what was going on and had to restructure
my code.

One thing you could try is using the primeFaces p:dataTable, I've not actually
checked to see if it's any better in this respect than h:dataTable, but it's a far
better componet in other respects.

Regards,
Brendan.
[Message sent by forum member 'healeyb']

http://forums.java.net/jive/thread.jspa?messageID=484031