Skip to content
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

fix slow or OutOfMemory in SmartCopy with some pdfs #807

Merged
merged 1 commit into from
Sep 14, 2022

Conversation

albfernandez
Copy link
Contributor

Description of the new Feature/Bugfix

In some pfs, using pdfsmartcopy can lead to a very slow and in some cases to an OutOfMemoryError.
PdfSmartCopy has a limit of 100 recursive levels, but it run all 100 levels,
With this change, when the limit is reached the "smart" copy is aborted for that object and normal copy is used.
Provided a tests case and a sample "broken" pdf example file.
Without the patch, the pdfsmartcopy takes some minutes, with the patch it only takes a few seconds.

Unit-Tests for the new Feature/Bugfix

  • Unit-Tests added to reproduce the bug

Compatibilities Issues

No

Testing details

NO

@sonarcloud
Copy link

sonarcloud bot commented Sep 5, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@asturio
Copy link
Member

asturio commented Sep 12, 2022

Hi @albfernandez , the checkstyle problems were fixed on master. Can you please rebase your branch onto OpenPdf/master?

@asturio asturio added this to the 1.3.30 milestone Sep 14, 2022
@asturio asturio merged commit 0bcc1a3 into LibrePDF:master Sep 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants