Starting with the latest release we are going to publish benchmark results of the Konik library.
Our objective is to create and maintain a library that is scalable enough to process many hundreds of PDFs per second.
Initially we start small by benchmarking ITextPdfInvoiceAppender.
-
Reading a sample PDF from disk
-
Marshalling the invoice model to XML
-
Appending the generated XML to PDF
-
Reading existing XMP content from the PDF
-
Changing the XMP content to add ZUGFeRD information
-
Overwriting the XMP content of the PDF with the modified XMP version
-
Writing the final PDF to output stream or byte array
- Benchmark interpretation
-
The benchmarks mode is set to measure operation throughput per second (ops/s)
- Benchmark setup
-
20 samples were taken after a JVM warm up phase of 20 iterations.
- Hardware information
-
The benchmarks were performed on a MacBookAir4,2 having a 1.8 GHz Intel Core i7 CPU.
Benchmark Mode Threads Samples Mean Units
i.k.b.ITextPdfInvoiceAppenderBenchmark.append_witStreams thrpt 1 20 27,16 ops/s
i.k.b.ITextPdfInvoiceAppenderBenchmark.append_witStreamsAndThreads thrpt 4 20 38,25 ops/s
i.k.b.ITextPdfInvoiceAppenderBenchmark.append_withByteArray thrpt 1 20 26,88 ops/s
The following benchmark is equal to the one above, except that the code under test does not read, modify or appends XMP
content to the PDF. Results of this benchmark represent the state of the iText-Carriage prior version 0.2.0.
Benchmark Mode Threads Samples Mean Units
i.k.b.ITextPdfInvoiceAppenderBenchmark.append_witStreams thrpt 1 20 27,97 ops/s
i.k.b.ITextPdfInvoiceAppenderBenchmark.append_witStreamsAndThreads thrpt 4 20 39,32 ops/s
i.k.b.ITextPdfInvoiceAppenderBenchmark.append_withByteArray thrpt 1 20 29,30 ops/s
Finally we also benchmarked, the throughput of the XMP Appender which parses, modifies builds XMP content.
Benchmark Mode Threads Samples Mean Units
i.k.b.XmpAppenderBenchmark.append_reuseAppender thrpt 1 20 656,90 ops/s
i.k.b.XmpAppenderBenchmark.append_reuseAppenderWithThreads thrpt 4 20 1203,26 ops/s
i.k.b.XmpAppenderBenchmark.append_withNewAppender thrpt 1 20 439,76 ops/s