Skip to content

Navigation Menu

Sign in
Sign up

Add pypdf benchmark - #343

Open
mdboom wants to merge 2 commits into
python:main from
mdboom:add-pypdf-benchmark
Open

Add pypdf benchmark #343
mdboom wants to merge 2 commits into
python:main from
mdboom:add-pypdf-benchmark

Conversation

@mdboom

@mdboom mdboom commented Jun 14, 2024

Copy link
Copy Markdown
Contributor

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

@ericsnowcurrently ericsnowcurrently Jun 21, 2024

Copy link
Copy Markdown
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()

@ericsnowcurrently ericsnowcurrently Jun 21, 2024

Copy link
Copy Markdown
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
Copy Markdown
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.

ericsnowcurrently reacted with thumbs up emoji
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@ericsnowcurrently ericsnowcurrently ericsnowcurrently left review comments

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /