Jump to content
xisto Community
kvarnerexpress

Zipping Jsp Output

Recommended Posts

Dear,Has anyone had experience with returning large sets of data to a dynamically built HTML table?I am returning about 1000 rows from a ORACLE Server. These 1000 rows are placed into an HTML table with about 25 different columns.I am trying to find out where is it that is slow, taking about 30 seconds for the table to display once the browser is launced. So far I think it is the actual rendering of the huge HTML table to the browser that is slow.1) It is not SQL. Takes about 4 seconds execution time for my SQL statement to bring back 1000 rows. This should be acceptable given it has lots of conversions from datetime to varchar.2) I am using Java Beans which generate the Dynamic HTML output to the JSPs.3) I can tell from the print stack that the HTML table rows are being built fast. Between the completion of the HTML table and displaying to the browser, there is about a 7-8 second lag time. Is this the time the browser takes to render the HTML table?Has anyone been through this before?Thanks.

Share this post


Link to post
Share on other sites

I would say it probably is the browser. 1000 is a lot of rows. I've been doing some testing of a site I'm redesigning and the more rows in a table, the longer it takes to load. The same with another page without lots of dropdown menus with many options - the frame of the page loads quickly but the whole thing has to wait while each of the options is printed out.

Share this post


Link to post
Share on other sites

Yeah, it is the browser. Tables are rendered very differently than other HTML objects because the browser needs to read all the values in the table (about 1000 in your case) before it can display the table.I would recommend using the <div> tag and CSS to achieve the look of a table. That way, the browser will display each value as soon as it's done rendering.

Share this post


Link to post
Share on other sites

Hey, The way any browser deals with a table is that it would look for <table> and then the closing tag </table> before rendering it, now with a return of 1000 rows, and 25 columns, obviously the time to read start of table and end of table tag leads to no display. To avoid this what I may suggest is to break one big table in, small tables. Thus you can run a loop to display first 25 rows, which I am sure would be much faster. Alternate is to keep the values stored in vector and display results in different pages, like in google search you get option to move between pages. That would not only make your page show up fast, it would also a user to read limited data, reading 1000 columns does not make it easier for user as well to read or find what he/she is looking for. hope that helps -- cheers

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.