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

Refactor writer._sweep_indirect_references: _idnum_hash and extern_map #1036

Closed
MartinThoma opened this issue Jun 28, 2022 · 0 comments · Fixed by #1072
Closed

Refactor writer._sweep_indirect_references: _idnum_hash and extern_map #1036

MartinThoma opened this issue Jun 28, 2022 · 0 comments · Fixed by #1072
Labels
is-maintenance Anything that is just internal: Simplifying code, syntax changes, updating docs, speed improvements PdfWriter The PdfWriter component is affected

Comments

@MartinThoma
Copy link
Member

In #207 we received valuable feedback that we might have code duplication: #207 (review)

It was not clarified within that PR as the PR improved PyPDF2 and I wanted to avoid a further delay (after 7 years of waiting!) with merging it.

This issue is only here as a reminder to have a look at it.

@MartinThoma MartinThoma self-assigned this Jun 28, 2022
@MartinThoma MartinThoma added is-maintenance Anything that is just internal: Simplifying code, syntax changes, updating docs, speed improvements PdfWriter The PdfWriter component is affected labels Jun 28, 2022
@MartinThoma MartinThoma removed their assignment Jul 9, 2022
MartinThoma pushed a commit that referenced this issue 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is-maintenance Anything that is just internal: Simplifying code, syntax changes, updating docs, speed improvements PdfWriter The PdfWriter component is affected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant