Apple M1 - Performance

75 views
Skip to first unread message

Vridek

unread,
Jan 23, 2022, 7:37:53 AM1/23/22
to wkhtmltopdf General
Hello everyone :).

I would first like to thank the authors for a great library that is an integral part of my work life.

I'm doing font previews for the FontPark project. This preview is quite large and the source version is in html which uses CSS to load a certain font.

The script is created in Python, it's very simple. The problem occurs when I call the script on a MacBook M1 Pro 2021. It takes about 1.3 seconds to create such a preview. Once I call the same script on a desktop PC with AMD Ryzen 9 5900X processor I am at 300-400ms.

Another difference is that the image preview created in M1 is about 240kB and in Windows 130kB.

I want to ask if this is a common thing or the problem is in the M1 processor. Will there be time to optimize wkhtmltoimage for Arm processor?

Thank you and have a great day everyone

Tomas


Preview creation on Apple M1
https://fontpark.com/m1.png


Preview created on AMD Ryzen 9 5900X
https://fontpark.com/windows.png

Channel 1

unread,
Feb 3, 2022, 3:28:37 PM2/3/22
to wkhtmltopdf General
Hi,
I don't know about the specific processor internal compression. but you can get more compression by using 
--image-dpi <integer> When embedding images scale them down to this dpi (default 600) --image-quality <integer> When jpeg compressing images use this quality (default 94)
can find more option on this Link.
https://wkhtmltopdf.org/usage/wkhtmltopdf.txt

Thanks.
Waqas Raza
Full Stack Developer

Jonathan Rynd

unread,
Apr 1, 2022, 8:32:25 AM4/1/22
to wkhtmltopdf General
Are you using the default X86-64 build of wkhtmltopdf, or did you build it yourself for M1? Any program run on a M1 machine that wasn't compiled for it has to start the Rosetta emulation environment when it starts.
Reply all
Reply to author
Forward
0 new messages