Decrease rest report server polling interval

1 Answer 74 Views
Report Viewer - WPF
Aleksandar
Top achievements
Rank 1
Iron
Aleksandar asked on 08 Jul 2022, 07:31 PM

Is there a way to decrease the time in between "info" polling while waiting for a report to process? Today it takes 2+ seconds consistently between "info" requests to the server (highlighted in yellow below). We'd like reports to display in as little time as possible. The server responds in 0.1 seconds, I'd like to see the interval set to .5 or .25.

On a side note, we are getting 405 errors on the "sessionTimeout" requests. Also, it looks like the report viewer is making the "client" request twice.

1 Answer, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 13 Jul 2022, 11:32 AM

Hello Aleksandar,

The Get Document Info requests are made regularly (in 500ms) from the viewer to the REST Service. When the received status is 202, the document processing is still in progress. Multiple Info requests indicate that it takes more time for the report to be rendered and it would make sense that the time between the very last such request that would indicate the processing has finished and the one before would be a little longer.

Regarding the 405 errors, the problem most probably comes from a greedy route in the routes configuration. I suggest moving the registration of the reporting routes before the default ones, for example, like in the following code snippet:

Telerik.Reporting.Services.WebApi.ReportsControllerConfiguration.RegisterRoutes(config);

config.Routes.MapHttpRoute(
    name: "DefaultApi",
    routeTemplate: "api/{controller}/{action}/{id}",
    defaults: new { id = RouteParameter.Optional }
);

The reason is that this way the reporting route will be prioritized and won't be overridden by the greedy ones. If you don't expose other WEB API routes, you may simply delete the default ones.

This has fixed the issue for a client who experienced it recently, and I hope it will solve it also for you. If the problem persists, please, send us the route configuration and the controllers for local investigation.

One last thing, we currently have a feedback item regarding this issue and I cast your vote on it in order to increase its priority and to ensure that you will receive a notification when this issue is fixed - The ApiDefault route registered in ReportsControllerConfiguration.RegisterRoutes hides some routes registered after it.

Regards,
Dimitar
Progress Telerik

Brand new Telerik Reporting course in Virtual Classroom - the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products. Check it out at https://learn.telerik.com/.
Aleksandar
Top achievements
Rank 1
Iron
commented on 13 Jul 2022, 01:29 PM | edited

Hi Dimitar,

Thank you for the reply! The Get Document Info request should be every 500ms. However, with the WPF Report viewer, they are always 2 seconds apart. Is this a bug?

The highlighted column below shows the time at which the request started, 9:24:59 AM in this case. All subsequent polls occur 2 seconds after the previous poll, not 500 ms.

Aleksandar
Top achievements
Rank 1
Iron
commented on 13 Jul 2022, 02:06 PM

Note the response time for each of those requests is 10ms, so it's not the server response that's holding up the next request.
Dimitar
Telerik team
commented on 15 Jul 2022, 03:02 PM

My apologies, I was incorrect about this. The desktop report viewers do perform this request every 2 seconds, unlike the HTML5-based ones that do it each .5 seconds.

This will be changed in a future release, I have approved the feedback item that you have created as a result of this - "Info" poll interval too long (telerik.com).

Once again, please accept my apologies for the incorrect information in my previous reply.

Aleksandar
Top achievements
Rank 1
Iron
commented on 15 Jul 2022, 03:43 PM

Dimitar, thank you for following up with this! It's much appreciated and will result in a reduction of report display time as much as 30% in some cases for us!
Tags
Report Viewer - WPF
Asked by
Aleksandar
Top achievements
Rank 1
Iron
Answers by
Dimitar
Telerik team
Share this question
or