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

Add pypdf benchmark #343

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Add pypdf benchmark #343

wants to merge 2 commits into from

Conversation

mdboom
Copy link
Contributor

@mdboom mdboom commented Jun 14, 2024

No description provided.

Comment on lines +4 to +6
Adapted from pypdf's own benchmarks:

https://github.com/py-pdf/pypdf/blob/main/tests/bench.py
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming it makes sense to do so, could we contribute a change upstream to make their benchmarks compatible with pyperformance (and pull them in like we do for the pyston benchmarks), instead of landing a new benchmark here?


Rotation, scaling, translation, content stream compression, text extraction
"""
content = (DATA_DIR / "libreoffice-writer-password.pdf").read_bytes()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, GitHub says this is an invalid PDF file, though I'm sure it's fine.

Also, it may be worth adding a note about where this file came from and what's in it, especially since it's a binary format.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that's a good point. It's a password-protected PDF file, which is probably why Github doesn't like it. I just grabbed what pypdf was using -- we could choose something more deliberately.

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