danvergara / morphos

Self-hosted file converter server
MIT License
750 stars 33 forks source link

Performance when converting PDF to JPG images #45

Closed anhgeeky closed 3 months ago

anhgeeky commented 3 months ago

Describe the bug When I convert PDF to JPG images. The PDF file has 106 pages (~8MB)

Expected behavior I tried changing github.com/unidoc/unipdf to github.com/gen2brain/go-fitz Performance is clearly improved unipdf/v3: 4m42.8998436s go-fitz: 47.2890154s

Desktop (please complete the following information): OS Name Microsoft Windows 11 Pro Version 10.0.22000 Build 22000 System Type x64-based PC Processor Intel(R) Xeon(R) CPU E5-2696 v3 @ 2.30GHz, 2301 Mhz, 18 Core(s), 36 Logical Processor(s) Installed Physical Memory (RAM) 64.0 GB

danvergara commented 3 months ago

Don't understand. Isn't this a feature request?

Do you have a PR replacing unipdf with go-fitzor you want me to do the change? Don't get me wrong, I'm fine with both, I just want to know to act accordingly. I'm more than happy to get rid of unipdf, so let me know what's the meaning of this.

danvergara commented 3 months ago

I just replaced unipdf as you suggested @anhgeeky.

Care to QA this PR, please?

https://github.com/danvergara/morphos/pull/46

anhgeeky commented 3 months ago

That great, I tried again with this issue, the performance is much better.

image

Thank you @danvergara

Hope this PR is merged into main soon

tranminhbinhit commented 3 months ago

Good idea