Webspeed - Progress Bar

#1
Hi,

I have searched the forum for similar topics but can not find anything similar so I hope someone can help.

I have created a new webspeed report which takes some time to run due to the amount of data it needs to process. The problem is people then think the page has crashed so keep pressing refresh...

Is there a way to put a progress bar on a webspeed report or at least an animated gif so people get the perception its still running. A progress bar would be ideal so they know when its nearly complete.

I dont do much work in webspeed so I am hoping someone can help here.

Thank you.
 

Cecil

19+ years progress programming and still learning.
#2
Are you writing the report to file or is just an HTML (<table>...</table) page?

There are few ways to fix this but they are not all perfect.

Yes, you could have an animated GIF (gears turning), but that does not give a real status, it's just eye candy. Plus, it confuses users thinking that it's working and doing something when in fact timed out.

If the report does take a long time to process, you could email a URL link back to your page once the report has completed. So, even if the user navigates away from the screen they can still get the final report. This would involve saving the report to the DB or disc for faster retrieval.

Historically, where I have a server-side process taking a long time (i.e. creating a report), I've updated record called HartBeatStatus. Using JQuery & AJAX, I have periodically polled the server once every ~2 seconds and return back the last known status from the HartBeatStatus record and updating a visual display on the browser. It does mean adding extra code to your existing code to update the HartBeatStatus record in the interaction of your FOR EACH block statement. So not to impact on the performance you can only update the HartBeatStatus record when IF ETIME MOD 4 EQ 0 THEN /** UPDATE HART BEAT code goes here**/

Also, is there an indexing issue which could be causing the report to be slow.?

Another Idea and this is possibly going to be the quickest but it won't work if you have compression enabled on your web server (APACHE or IIS), is to flush the web stream as it generating the report. PUT {&WEBSTREAM} CONTROL NULL(0). . Have this inside your FOR EACH block and it will force WebSpeed to output the current content as is creating it. So, there is no need to wait for the report to complete before returning the content back to the browser.






P.S. I'm available for hire. PM if interested.
 
Last edited:
Top