Creating StiReport object takes too long

Stimulsoft Reports.WEB discussion
Post Reply
lmponte
Posts: 4
Joined: Tue Aug 05, 2014 5:08 pm

Creating StiReport object takes too long

Post by lmponte »

Hello,

I ran across a problem in one of the servers where our application is deployed which was causing a time out every time a user tries to view a report.
I narrowed down the problem to the following line of code:

Code: Select all

this.Report = new StiReport();
This line alone is taking more than 5 minutes to execute, which then causes a timeout on our application.
This works in every installation except for this particular machine. In fact, even on this machine, the reports worked flawlessly in the beginning.
I do know that someone tweaked permissions and group memberships on this machine and it seems like it stopped working after that. However, I cannot seem to determine exactly what may be causing this line of code to block for so long. It is running Windows Server 2012 and it's actually acting as a Domain Controller. The user executing the application is a Domain Controller and has administrative privileges on the server.

Do you know why simply creating an StiReport object may be taking more than 5 minutes?
Does it require access to any path on the file system, by any chance?

Here is some additional options that we are using (may or may not be helpful):

Code: Select all

StiOptions.Engine.HideExceptions = false;
StiOptions.Engine.HideMessages = true;
StiOptions.Engine.HideRenderingProgress = true;
StiOptions.Engine.ShowReportRenderingMessages = false;

StiOptions.Engine.UseGarbageCollectorForImageCache = true;
StiOptions.Engine.ImageCache.Enabled = false;
StiOptions.Engine.ReportCache.AllowGCCollect = true;
StiOptions.Engine.ReportCache.AmountOfProcessedPagesForStartGCCollect = 1;
StiOptions.Engine.ReportCache.LimitForStartUsingCache = Int32.MaxValue;
StiOptions.Engine.RtfCache.AllowGCCollect = true;
StiOptions.Engine.RtfCache.Enabled = false;
We are using version 2011.2.1100.0 of Stimulsoft reports assemblies.

Thank you very much for any help you can provide.

Best regards,

Luís Ponte
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Creating StiReport object takes too long

Post by HighAley »

Hello.

Please, try to set next option.

Code: Select all

StiOptions.Print.AllowUsePaperSizesFromPrinterSettings = false;
It disables some requests for printer settings that could case exceptions and delays.

Thank you.
lmponte
Posts: 4
Joined: Tue Aug 05, 2014 5:08 pm

Re: Creating StiReport object takes too long

Post by lmponte »

The property you have suggested does not exist in the version we are using, unfortunately.

However, we already found the problem. The default printer configured in Windows was a network printer that was offline. It looks like the constructor for StiReport is trying to access the default printer (maybe to get some settings), and it simply blocks if it is not available.

As soon as I set the default printer to a local printer, the problem disappeared.

Thank you very much for your help!

Luis
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Creating StiReport object takes too long

Post by HighAley »

Hello.

Thank you for your solution.
It will help other customers.

Thank you.
Post Reply