-
Notifications
You must be signed in to change notification settings - Fork 178
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
Solve most congestions issues in /tmp (client & Server) #619
Closed
Closed
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
3046cb7
Process PDF->RGB in groups of 50 pages
deeplow 45a7122
Optimize PDFtoPPM batch conversion to run continuously
deeplow c15cbd6
Save RGB as PNG immediately to save space
deeplow ebfed4e
Merge size checks onto common isolation provider
deeplow f7190e3
PDFunite: fix too many open files
deeplow f99ad74
Bump min py version to 3.8 and add Pillow module
deeplow c0a656c
FIXUP: num_batches miscalculation
deeplow eebd556
FIXUP: add python3-pillow as deb/rpm dependency
deeplow File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question: what do we gain by batching the
pdfunite
operations?At this point, we already have all the pages as PDF files on disk, and that is the main space hog, right? I get that with a single
pdfunite
call we need double the space, but that's a requirement for the conversion step as well, which takes the original PDF and creates a compressed one, and they both co-exist in the disk.I have another suggestion here: using PyPDF2 instead, and perform compression online:
(snippet taken from the docs)
With PyPDF2, we can open each PDF, compress it, and immediately create the output PDF, without
pdfunite
andps2pdf
. We can even delete the underlying PDFs as we process them. The good thing aboutPyPDF2
is that it's available in Fedora repos as well, so it will work on Qubes.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's in the commit message. So it's not size-related but rather ulimit related. We could change the ulimit, but since I had already done the batch logic, I figured it could be reused here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh snap. I didn't expect that Qubes had such a low ulimit (nor that
pdfunite
opens the files at the same time, jeez...).