-
Notifications
You must be signed in to change notification settings - Fork 32
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
Parallelise makeresource commands #1309
Open
eAlasdair
wants to merge
13
commits into
develop
Choose a base branch
from
parallelisation
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
eAlasdair
added
suggestion
content: printables
Related to the printable resources
infrastructure
Related to the infrastructure running this software
labels
Jan 21, 2020
eAlasdair
changed the title
Parallelise makeresource commands
DRAFT: Parallelise makeresource commands
Jan 21, 2020
eAlasdair
changed the title
DRAFT: Parallelise makeresource commands
Parallelise makeresource commands
Aug 5, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
content: printables
Related to the printable resources
infrastructure
Related to the infrastructure running this software
suggestion
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.
The problem:
makeresources
command, which generates PDFs (Printables) for resources, takes so long that the task needs to be split into 11 different jobs on Travis.Main Changes:
makeresources
commandupdate_lite
instead ofupdate
for making resources in dev_deploy scripts that use themakeresources
command(prod_deploy is unchanged presently)
Secondary Changes:
makeresourcethumbnails
command (resolves Parallelise makeresourcethumbnails command #855)Effects:
On my PC (6c12t) using 6 threads
makeresources
command (details below)makeresourcethumbnails
commandupdate
commandsqlite3.ProgrammingError
when attempting to run over multiple threads. I couldn't figure why these 6 had an sqlite3 object that the others didn't have, so I added code that reverted to processing in series when a problem was detected. Further improvements should be possible if we can get a nicer solution.Binary to Alphabet
resource is the only one that is successfully parallelised yet consistently takes longer to generate.Travis
Sadly I have no way to check in advance how any of these changes will affect our actual deployment
update_lite
instead ofupdate
is a ~90% reduction in time to complete for (as far as I can tell) the same resultKnown Issues
When Travis runs tests on this branch (
continuous-integration/travis-ci/pr
,continuous-integration/travis-ci/push
), it can get a 'file already exists' error when running themakeresources
part of the tests.My theory is that it's related to Modify tests to not write to build/static/staticfiles directories #700 – Travis runs these test jobs in parallel so it might be possible to (for example) have the management tests fail when creating a file because the test backwards had already created the file and not yet removed it. This would explain why I haven't seen any test fail when run in series. However, entirely different builds shouldn't interfere with each other so I don't know for sure
None of the tests replicate the issue that prevents multithreading when creating resources/thumbnails, so the exception handlers don't get hit in codecov