• 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

dataTable renders slow

 
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a query which gives 500 records at once.

The query ends after appox. 1-2 seconds.

I bind the result-list to my datatable.

The list (ArrayList) is filled within 1-2 seconds successfully,
but JSF needs further appox. 5 seconds to render my datatable with that list.

Is that normal??

The list is returned within 2 seconds, but the datatable needs further 5 seconds.

So I have to wait appox. 7 seconds for the view.

How can I accelarate that?
 
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
500 records at once is not normal, no. Introduce paging. An average user already don´t like more than 100 items per view.

5 seconds is also not normal, no. Upgrade your JSF version if necessary. There were been a lot of performance enhancements since JSF came out for the first time. Assuming you´re using Mojarra / RI, you can get the most recent here: https://javaserverfaces.dev.java.net
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You may find this tool useful as well: http://www.prime.com.tr/facestrace/
Demo: http://www.nightdev.devisland.net/facestrace-example/createBook.jsf
 
nimo frey
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Look at my phase listener:


AFTER 2 Seconds the RENDER_RESPONSE 6 occurs, BUT NOW I HAVE TO WAIT appox 5 seconds after the second "RENDER_RESPONSE 6"
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Uh, yes, OK.

Now, have you read my replies at any way?
 
nimo frey
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
the thing is, when I reduce the rows via rows-Attribute of my datatable then it s renderes faster as using a higher number. I use Facelets (in debug-modus) and JSF 1.2.

I do not want to reduce my row-number as I use a datascroller and a paginator (this works well).

The datascroller shows only a little amount of the datas and have the advantage not to use the paginator to often!

But I cannot understand why my view renders sooo slowly even the phase listener says that all phases are done.
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If it´s fast enough on the server side, then it´s just a client side issue. The client is apparently using a slow webbrowser and/or a slow PC. MSIE for instance is a slow browser. Try for example Opera, it is known to build up the DOM tree very fast. Google Chrome is known to execute Javascript very fast (the dataScroller is overloaded with huge amount of Javascript, you know).
 
Ranch Hand
Posts: 101
Spring Flex Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I too have the same issue. I used JProfiler and its showing that each JSFComponent is taking considerable amount of time to render,especially if i increase the number of users to 20, the page is taking approximately 17-18 secs to render. I have one datatable which renders atmost 60 records. Each record is a command link. Other than that i've two subviews which has some text boxes and output texts. I'm using tomahawk tiles view handler. Hope it is not causing any problem.I am using jsf1.1. I cannot use jsf1.2. Any suggestions to improve performance.?
 
nimo frey
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I guess, Bauke is right by saying that this is only a client-side-issue.


For example, I am using Firebug and found out, that switching it off renders the page very faster !!!

 
Shasi Mitra
Ranch Hand
Posts: 101
Spring Flex Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
MSIE is the only suggested browser for our clients..And as you said it is taking lot of time to render the page..We have to use that only. So you are saying that as long as we use IE performance will be bad rite?
 
nimo frey
Ranch Hand
Posts: 580
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I do not know, but it is definitly a client-side-issue as the server is really fast enough.

For example, in Mozilla with about:config you can set the browser. For example: layout.inital.delay or the like.
 
reply
    Bookmark Topic Watch Topic
  • New Topic