PI: Iterative _sweepIndirectReferences#351
Closed
jvalenzuela wants to merge 15 commits intopy-pdf:mainfrom
Closed
Conversation
Member
|
I like that you've added a test! I'll need some time to come back to this one, though |
MartinThoma
reviewed
Apr 16, 2022
Codecov Report
@@ Coverage Diff @@
## main #351 +/- ##
==========================================
+ Coverage 74.96% 75.08% +0.11%
==========================================
Files 12 12
Lines 3555 3564 +9
Branches 820 819 -1
==========================================
+ Hits 2665 2676 +11
+ Misses 674 673 -1
+ Partials 216 215 -1
Continue to review full report at Codecov.
|
Member
|
@jvalenzuela Thank you very much for this contribution ❤️ I'm sorry I didn't manage to merge your PR earlier. It's been a long time and PyPDF2 made a lot of progress since April. As #1072 has the similar changes and no conflicts with |
MartinThoma
pushed a commit
that referenced
this pull request
Jul 10, 2022
* Recursive Depth-first search (DFS) was changed to iterative DFS * Removed PdfWriter.external_reference_map and calculate hash from every referred object and use that to detect duplicate objects. * In several cases, the warning "Unable to resolve .*, returning NullObject instead" is no longer necessary. * Bugfix: Recalculate all parents hashes when a dictionary or array object value changes Closes #351 Closes #1036
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes the way indirect references are swept during the write process, handling nested data structures iteratively instead of recursively. Addresses problems with hitting Python's recursion limit when processing files with large data structures, e.g. thousands of pages with a bookmark on each.