Issue
I have a page that shows results of a query. The results are displayed using a Repeater control that emits a div element that holds text data and images related to that particular result. The problem is that the page takes considerable amount of time to load partly because of the huge amount of processing required to generate the data.
So, is there a way to improve the page load by incrementally rendering the page rather than the have the user wait until the full data is available
I was thinking about sending the text data of each result first, and then as the images are available, send them to client to be displayed with each result. I guess I will need to use AJAX, but I'm not exactly sure how to get this done.
Does anyone have any suggestions or experience with this situation?
Thanks,
Solution
If you are going to control the flow, you can set up flushing on the binding event so the data is flushed out prior to having everything. But that may not be the best option; and, with standard tagged documents (rather than CSS docs) it might not help anyway, as the browser may not render even when flushed (depends on the tags in the Repeater).
Another option is retrieving via AJAX and flusing as data comes in (or at least showing a "wait for it" graphic). The wait graphic can be done without AJAX, but the load with AJAX pattern is well documented.
You can also limit the amount of data on a single page, unless this is a report of some type.
Answered By - Gregory A Beamer Answer Checked By - David Goodson (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.