add worker_threads optimization for setup #90
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.
Worker thread implementation essentially halves the setup time for h5p libraries that have many dependencies like h5p-course-presentation and h5p-column.
To-do:
1 - When using the
H5P_SSH_CLONE=1
env var and an ssh key with a password added to the ssh-agent, since the cloning now happens in a separate thread, the ssh-agent context is lost and the cloning is done via https instead of ssh. So you cannot push to origin from the cloned repos. This needs to be fixed.2 - Handle "folder already exists" cloning error as not an error (the same library might be cloned again by another worker thread running in parallel) and let other errors stop the setup as was the case before.