• Post Reply Bookmark Topic Watch Topic
  • New Topic

h:dataTable performance  RSS feed

 
Klaus Schuster
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Tim Holloway
Bartender
Posts: 18663
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Bart Kummel
author
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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....
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!