• 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

h:dataTable performance

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Saloon Keeper
Posts: 27752
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
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
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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....
 
Let's go to the waterfront with this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic