What happens after applying filters in report on a background?

0

What happens after applying filters in report on a background? 

I have created report with many parameters, which should be set by user. When I run this report in Jasper Studio, I get correct result in a few second as I expected. But when I deploy report to server and correctly mapped parameters to their input controls, select values and after push apply button, the execution takes more than 10 times longer. 

I understand, that ther is process, that takes the hidden values from input controls and pass them to the report parameter. But why so long execution? Is it cause by refreshing input controls values?

My input controls has their own sql queries and all together take about one minute after run report. But this process should be executed only one times and not after applying filter, shouldn't it? Are there some ways, how to improve performance of this report?

 

Thank you for your responses.

tomas.nemecek's picture
Joined: Mar 10 2017 - 7:39am
Last seen: 1 year 2 months ago

2 Answers:

0

JasperReports Server is a multi-user system while Jaspersoft Studio is a single user program. As such, JasperReports Server has an overhead to handle many users even though there may only be few.

Most of the time, JasperReports Server is slow when there is not enough memory. I recommend at least 8 GB just for JasperReports Server and have database running on a different server.

hozawa's picture
54460
Joined: Apr 24 2010 - 4:31pm
Last seen: 6 months 3 days ago
0

hozawa, thank you for your fast response.

Memory is a good point.

But the performance differencies are also noticeable when I deploy same report to server and mapp their input controls, and the second time deploy, overwrite his resources and set type as Use Local Resource. 

When I run both reports and set same parameter values and push Apply button, the second one is much more faster then the first one. This is a clear testament, that SQL query execution is not bottle neck. I understand, that the report with input controls needs to explore input controls, find selected values, lookup internal IDs for each one and pass them to parameters and then to SQL query. But it seems, that collecting of these values is running synchronously, isn't it? Or is possible, that the server makes data type conversions, which last so long? The most of my parameters is BigDecimal data type (not optimal, I know) and a few of them are Collection of BigDecimal.

Are there some possibilities to set execution asynchronously? Or is helpful to try setting Early Evaluation Time as parameter attributes? Do you know, which part of source code of JasperServer solve these action. I want to explore and understand this part of report execution.

Thank you very much.

 

UPDATED: 2017-09-08:

I fixed problem by deeper analyzing input control source queries. Two of them has unefficient expressions and joins, which make query very slow. After simplifying these queries, report generates results faster. But currently, I don't understand why. When pressing Apply button I thought, that input control queries are not executed, but this behavior seems, that this idea is not correct.

tomas.nemecek's picture
Joined: Mar 10 2017 - 7:39am
Last seen: 1 year 2 months ago
Feedback
randomness