-
Notifications
You must be signed in to change notification settings - Fork 1
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
perf: monitor PDF generation performance #247
Comments
BenchmarkHere is the outcome of some high-level benchmarks for the PDF generation examples.
generate-en10168-pdf-template
generate-coa-pdf-template
It is quite surprising that most of the processing time is spent in the |
The flame graph below results from a CPU profiling of the I now think of the following potential improvement tracks:
|
The most straightforward track is "try another font". I did that, and the results are hard to believe! generate-coa-pdf-template
Yes, you read correctly; the process is 7 times faster. I suspect performance could be even better when using optimal fonts with the WOFF2 format, but during the trial, I ran into a |
And this is the rendered PDF: The fonts are not exactly the same weight as previously, but it is just a matter of picking the right ones from the |
Nice job with the benchmarking, remarkable how much of a difference changing the font made! After reading through this, I recommend that the related PR be merged first and that @christophbuehler runs the performance benchmarks against the proposed new font as the time saved is significant! |
Indeed the results with a new font are surprising. I was also not able to get a PDF/A-3 compliant document with that font because of some incorrect measurements. However, to keep things separated, we should merge #241 asap and update the performance monitoring (this branch) to take the most recent code changes (attachments / new font / PDF/A3) into consideration. Let's not mix responsibilities. |
Description
From our usage of S1Seven's platform, we observed that producing PDF for an average certificate takes 2-3 seconds.
Still, we have yet to determine where most of the time is spent and if the process can be improved.
I suggest running measurements in our example scripts and eventually adding some thresholds in our integration tests.
The text was updated successfully, but these errors were encountered: