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

get_pixmap function takes too long to process #3450

Closed
anirudhagarwal1 opened this issue May 8, 2024 · 6 comments
Closed

get_pixmap function takes too long to process #3450

anirudhagarwal1 opened this issue May 8, 2024 · 6 comments
Labels
fix developed release schedule to be determined upstream bug bug outside this package

Comments

@anirudhagarwal1
Copy link

Description of the bug

When trying to create a pixmap for a PDF file, get_pixmap function takes too long even though the page size is well within the required limits.

pdf_in = fitz.open(stream=io.BytesIO(initial_bytes=pdf_bytes), filetype="pdf")
page = pdf_in[0]
pix = page.get_pixmap(alpha=False, dpi=150)

The step get_pixmap takes about 62 seconds to process on my macbook pro. Wanted to understand the reason why this takes so long and how can I bring down this time.

How to reproduce the bug

temp-6.pdf
This is the PDF file that I am using.

PyMuPDF version

1.24.2

Operating system

MacOS

Python version

3.10

@JorjMcKie
Copy link
Collaborator

Observation confirmed. will submit a MuPDF bug report.

@JorjMcKie JorjMcKie added the upstream bug bug outside this package label May 8, 2024
@JorjMcKie
Copy link
Collaborator

MuPDF bug report link: https://bugs.ghostscript.com/show_bug.cgi?id=707777

@anirudhagarwal1
Copy link
Author

Do you have an idea about usually how much is the TAT for such issues?

@JorjMcKie
Copy link
Collaborator

These issues usually are solved rapidly within PyMuPDF as well as MuPDF.
Of course there may be stubborn cases ...
You will have to wait for a new release anyway though.

@JorjMcKie JorjMcKie added the fix developed release schedule to be determined label Jun 22, 2024
@cfcurtis
Copy link

I'm glad a fix is in progress, I came here to report this. Interestingly it seems to be a regression - I updated PyMuPDF (from 1.21.1) and immediately noticed that it was much slower.

@julian-smith-artifex-com
Copy link
Collaborator

Fixed in 1.24.10.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix developed release schedule to be determined upstream bug bug outside this package
Projects
None yet
Development

No branches or pull requests

4 participants