PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Fri Mar 29, 2024 12:10 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Mon Aug 29, 2016 4:49 pm 
Offline

Joined: Tue Jul 26, 2016 5:07 pm
Posts: 32
Hi all,

I am developing a Windows service that among other things has to generate the very uniform PDFs: 3-4 pages of plain text, a couple of tiny tables (2-3 columns, 1-2 rows), a single 9kb image in the page header.

It seems that after the service is started, the very 1st PDF takes about 5 seconds to generate, while the rest take about 2-3 seconds.
The difference is very reproducible. If I shut down the service, then the 1st PDF takes longer to RenderDocument().

This is nothing major, but I just want to understand why and what is involved.


Top
 Profile  
Reply with quote  
PostPosted: Mon Aug 29, 2016 6:44 pm 
Offline
PDFsharp Expert
User avatar

Joined: Sat Mar 14, 2015 10:15 am
Posts: 909
Location: CCAA
Hi!
vorobej wrote:
This is nothing major, but I just want to understand why and what is involved.
I think one factor is the Just In Time compilation (IL to native code).
First invocation may include loading .NET and other one-time tasks.

You wrote "Windows service". Is it a Web service (MVC or such)? In that case there may even be some CS or VB compilation in the background on the first invocation.

_________________
Best regards
Thomas
(Freelance Software Developer with several years of MigraDoc/PDFsharp experience)


Top
 Profile  
Reply with quote  
PostPosted: Mon Aug 29, 2016 9:09 pm 
Offline

Joined: Tue Jul 26, 2016 5:07 pm
Posts: 32
No, just a windows service.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 161 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group