Instead of using the single executable file, use the single directory approach for better performance - #77
Merged
berthertogen merged 2 commits intoApr 9, 2026
Conversation
…y files which prevents the extraction and deletion all the time if using weasyprint which leads to performance boost
Owner
|
Again another awesome contribution! Thank tou |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.