c# - Rotativa ActionAsPdf() Very Slow -


using rotativa 1.6.4 nuget , have noticed following issue using code below.

actionaspdf hangs randomly indeterminate amount of time.

code below hanging:

   var pdfresult = new actionaspdf("report", new {id = request.params["id"]})     {         cookies = cookiecollection,         formsauthenticationcookiename = formsauthentication.formscookiename,         customswitches = "--load-error-handling ignore"     }; 

background info may help:

the customswitches in use ignore documented issue calling wkhtmltopdf.exe using actionaspdf, not suppress errors in code in wkhtmltopdf call.

observations, usage , testing:

it works when running application (whether or not stepping through code), can anywhere 10 seconds 4 minutes between hitting pdfresult = new actionaspdf , entering "report" action being called. can't discern happening in output window of visual studio, no errors being thrown have found. random slow transition reports() action.

i can run reports() action directly via url , never slows , quite fast pdf generation. running using actionaspdf obtain binary save file system , send via email, prescribed method of doing library.

the behavior exists on both local windows 10 dev box , remote server 2008r2 test box. .net 4.5.1 on both boxes, default iis on each.

questions have:

any idea on might cause slow down , how remedy it?

i ended using urlaspdf() instead of actionaspdf() , works. seems there may issues actionaspdf() , have filed bug rotative project on github. actionaspdf() still marked beta, get's fixed in future versions or community.


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -