[ https://issues.apache.org/jira/browse/PDFBOX-5286?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17424830#comment-17424830 ]
Maruan Sahyoun edited comment on PDFBOX-5286 at 10/6/21, 8:12 AM: ------------------------------------------------------------------ Numbers from my side: before commit {noformat} PDFBoxPerformance.saveNoCompressionLargeFile ss 5 55557,758 ± 9645,445 ms/op PDFBoxPerformance.saveNoCompressionMediumFile ss 5 4228,877 ± 807,354 ms/op {noformat} after commit {noformat} PDFBoxPerformance.saveNoCompressionLargeFile ss 5 32010,558 ± 2286,229 ms/op PDFBoxPerformance.saveNoCompressionMediumFile ss 5 4041,268 ± 717,481 ms/op {noformat} Quick note on some variance in the numbers to earlier ones. Although I'm making sure while running the tests I'm not doing other tasks I'm not rebooting my device before running which ideally I should. In addition to have a quick comparison the numbers were done doing a SingleShot test where I really should be doing a larger number of iterations). But the trend is clear which was the intent of the test. was (Author: msahyoun): Numbers from my side: before commit {noformat} PDFBoxPerformance.saveNoCompressionLargeFile ss 5 55557,758 ± 9645,445 ms/op PDFBoxPerformance.saveNoCompressionMediumFile ss 5 4228,877 ± 807,354 ms/op {noformat} after commit {noformat} PDFBoxPerformance.saveNoCompressionLargeFile ss 5 32010,558 ± 2286,229 ms/op PDFBoxPerformance.saveNoCompressionMediumFile ss 5 4041,268 ± 717,481 ms/op {noformat} > Runtime degredation in RC1 and alpha2 > ------------------------------------- > > Key: PDFBOX-5286 > URL: https://issues.apache.org/jira/browse/PDFBOX-5286 > Project: PDFBox > Issue Type: Bug > Components: Parsing > Affects Versions: 3.0.0 PDFBox > Reporter: Maruan Sahyoun > Priority: Critical > > working/reviewing PDFBOX-5068 and PDFBOX-5263 I've experiencing runtime > issues for both 3.0.0-RC1 and 3.0.0-alpha2 when loading and saving a large PDF > https://crossasia-books.ub.uni-heidelberg.de/xasia/reader/download/506/506-42-86246-2-10-20190822.pdf > > ||version||runtime in millis|| > |2.0.24 |2076| > |3.0.0-RC1 |219472| > |3.0.0-alpha2 |282284| > Basic test: > {code:java} > long start = System.currentTimeMillis(); > PDDocument pdf = Loader.loadPDF(new File("506-42-86246-2-10-20190822.pdf")); > pdf.save(new NullOutputStream()); > pdf.close(); > long end = System.currentTimeMillis(); > System.out.println("Elapsed Time in milliseconds: "+ (end-start)); > {code} > with NullOuputStream > {code:java} > package org.apache.pdfbox; > import java.io.IOException; > import java.io.OutputStream; > public class NullOutputStream extends OutputStream { > @Override > public void write(byte[] b) throws IOException { > // don't write anything > } > @Override > public void write(byte[] b, int off, int len) throws IOException { > // don't write anything > } > @Override > public void write(int b) throws IOException { > // don't write anything > } > } > {code} > I've also running tests using JMH - they support these numbers. The > difference in numbers for RC1/alpha2 are within a regular variation. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org