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
PI: Use __slots__ #1524
PI: Use __slots__ #1524
Conversation
I'm running into https://stackoverflow.com/q/10857515/562769 |
@pubpub-zz Is |
Quite. 99% of the time |
There are two places where we assign indirect_reference: PdfReader:
PdfWriter:
Those cause problems with the slots (potentially only for mypy) |
Codecov ReportBase: 91.83% // Head: 91.83% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #1524 +/- ##
=======================================
Coverage 91.83% 91.83%
=======================================
Files 33 33
Lines 6073 6077 +4
Branches 1193 1193
=======================================
+ Hits 5577 5581 +4
Misses 321 321
Partials 175 175
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
@pubpub-zz The interesting question is if
I guess all of them (or at least one) could assign |
Although unusual the |
Ok, then I'll close it. We need to find another way (or find a way to add indirect_reference to the object while having multiple inheritance) |
More information
An awesome explanation on StackOverflow
How much is it worth?
It's about a 10x improvement in performance
Before:
After:
Text extraction speed according to the benchmark is not affected at all 🥲