Skip to content

Instead of using the single executable file, use the single directory approach for better performance - #77

Merged
berthertogen merged 2 commits into
berthertogen:mainfrom
isenmann:InsteadSingleExeSingleDir
Apr 9, 2026
Merged

Instead of using the single executable file, use the single directory approach for better performance#77
berthertogen merged 2 commits into
berthertogen:mainfrom
isenmann:InsteadSingleExeSingleDir

Conversation

@isenmann

@isenmann isenmann commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

I realized a downside of having the one file solution of weasyprint during doing some benchmarking on a Windows machine. Everytime you try to create a PDF the weasyprint executable extracts itself into the temp folder of the system, execute the weasyprint executable there and deletes the folder afterwards.

That's maybe fine if you are just creating PDFs occasionally from time to time but if you creating lots of PDFs or even small amount of pages this leads to a unnecessary bootle neck in I/O throughput. With the one directory solution there is no need to extract anything because everything is there already and can just be used as it is.

The benefit is still having the small size of the zip because it's the same way how the single file solution is created, but instead packing it up into one file, it's just packing it into one directory and can be used from there.

I have adjusted the ps1 script to build the one directory solution like the official developers does it on their side (except they built the single file instead single directory). Also the linux script was adjusted to build the single directory approach and the code was slightly changed to execute the correct binaries which are now in a directory.

isenmann added 2 commits April 8, 2026 09:56
…y files which prevents the extraction and deletion all the time if using weasyprint which leads to performance boost
@berthertogen

Copy link
Copy Markdown
Owner

Again another awesome contribution! Thank tou

@berthertogen
berthertogen merged commit 26e7d7d into berthertogen:main Apr 9, 2026
6 checks passed
@isenmann
isenmann deleted the InsteadSingleExeSingleDir branch April 13, 2026 07:49
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