| Author |
h:dataTable performance
|
Klaus Schuster
Ranch Hand
Joined: Feb 10, 2009
Posts: 30
|
|
Hi Bart,
I am trying to use the t:dataTable to get in a faster way on the screen.
The render time is very high, just of course of all my elements and functions included in the several columns.
Have you got any tips to get more performance on that element?
Thanks,
Klaus
|
 |
Bart Kummel
author
Ranch Hand
Joined: Nov 30, 2007
Posts: 81
|
|
Hi Claus,
I must admit I don't have much experience with performance tuning on JSF component level. I think most of the time a JSF component shouldn't be the "bottle neck". I would advise to optimize the code in your managed beans and persistence layer. I you have performance problems, it is always a good idea to use a profiler. That way you will be able to identify the code that takes the most time and thus should be optimized.
Sorry I can't give you a ready-to-implement solution. Performance problems are hard to tackle without in-depth knowledge of the project. I hope this answer at least helps you to search in the right direction.
Best regards,
Bart
|
SCJP 1.4 | SCJD 1.6 | Visit my website | Author of the book Apache MyFaces 1.2 Web Application Development
|
 |
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 14456
|
|
The #1 rule is that you shouldn't attempt to display a 10000-row table on a single page using h:dataTable. Or, for that matter, straight HTML. My eyeballs begin to bleed after the first couple of hundred rows.
Related to that, is that you should avoid fetching large numbers of rows from a database, even if they won't all display on-screen at once.
Basic dataTables with modest amounts of data shouldn't take an excessive amount of time to render, so chances are that something like one of the above issues is at fault. Or, for that matter, if the data requires heavy amounts of back-end computation. Which, by the way, you should NOT do in "getter" routines, since they can be invoked multiple times per page, and thus amplify the insult.
If you do have large amounts of data to chew through, consider using one of the scrollable datatable extensions such as you can get from MyFaces Tomahawk, RichFaces, IceFaces, and other third-party JSF extensions.
|
Customer surveys are for companies who didn't pay proper attention to begin with.
|
 |
Bart Kummel
author
Ranch Hand
Joined: Nov 30, 2007
Posts: 81
|
|
I agree with Tim. If you choose to use a scrollable data table, as Tim suggests, you should also consider the Trinidad table component.
Best regards,
Bart
|
 |
Klaus Schuster
Ranch Hand
Joined: Feb 10, 2009
Posts: 30
|
|
Hi,
I already using a scrollable dataTable.
I got some performance enhances by using a straight object model, and not as much small objects, where each need several service requests.
thanks,
Klaus
|
 |
Aman Goel
Greenhorn
Joined: Jan 14, 2010
Posts: 15
|
|
|
h:datatable performance is very slow because you can get the data friom the database directly ...Efficiencywise it is the best to use datatable...because of its databinding feature....
|
 |
 |
I agree. Here's the link: jrebel
|
|
subject: h:dataTable performance
|
|
|