-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multi threading the Document Rendering #11
Comments
Is anyone able to help with this? |
Anyone now? The original question is aimed at two persons only. Not my area of expertise. No definite answer, just some guesses. |
Thank you for your help. I appreciate it. I will try your suggestions. |
Things are a bit more complicated than I realised one hour ago. Pages: You can easily serialise these calls in your code: call AddPage() for all pages before starting the first render thread. Fonts: There are unverified reports that the locking mechanism for fonts in PDFsharp was not working. Known workaround: Use a single thread to create a dummy PDF that uses all the fonts you will ever need. Images: I would tackle this by adding a Lock to any DrawImage call in the XGraphics class. Other objects: There could be more objects I do not currently think of. Use the same lock you also use for images if there are any other objects. As always: It could be simpler to get it working for specific MigraDoc documents that use limited features than making a general implementation that works for all MigraDoc features. |
Thanks for the follow up comments. When i get to it, i will research what you explained and try to implement it. |
# This is the 1st commit message: Introduce xml format for serialization and deserialzion # This is the commit message empira#2: Update README.md # This is the commit message empira#3: Comment fix for release build # This is the commit message empira#4: xml parser fix # This is the commit message empira#5: last page header and footer # This is the commit message empira#6: footer fix # This is the commit message empira#7: upgrade README.md # This is the commit message empira#8: Update README.md # This is the commit message empira#9: last page header footer rendering fix # This is the commit message empira#10: ListInfo fix serialization # This is the commit message empira#11: paragraph parsing fix # This is the commit message empira#12: text parser fix # This is the commit message empira#13: support para break # This is the commit message empira#14: CDATA parser fix # This is the commit message empira#15: rounded corner radius for table cells # This is the commit message empira#16: makes DifferentLastPageHeaderFooter section aware # This is the commit message empira#17: fix cell serialization # This is the commit message empira#18: Avoid rendering failure images # This is the commit message empira#19: barcode rendering # This is the commit message empira#20: doc fix # This is the commit message empira#21: support barcode elements inside a paragraph # This is the commit message empira#22: barcode rendering fix # This is the commit message empira#23: amend README.md # This is the commit message empira#24: fix readme # This is the commit message empira#25: fix readme
Hi @ThomasHoevel / @StLange
This is only a question. I am using the following code to render the PDF document and at the same time monitor the progress. I have removed the progress monitoring code for simplicity.
The PDF document is around 3500 pages. It takes about 130 seconds to prepare the pages and another 100 seconds to render. Is there a way i can incorporate multi threading to speed things up? My simplistic attempts to do that for the rendering have failed.
Thanks,
Anthony
The text was updated successfully, but these errors were encountered: