Skip to content
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

Parallelize multiple http GETs #202

Merged
merged 3 commits into from Feb 21, 2020

Conversation

druscoe
Copy link
Contributor

@druscoe druscoe commented Feb 19, 2020

Added ThreadPoolExecutor and used to process GET requests in multiple
threads which enables chunks of data to always be available for
processing. Processing of the data can happen as soon as the first chunk
arrives.

Refactored the code to help implement. The idea is the "params" are
built in batch and passed to the thread pool which get the actual
results.

Removed previous usage of DTHREADS in favour of this implementation.

Added ThreadPoolExecutor and used to process GET requests in multiple
threads which enables chunks of data to always be available for
processing. Processing of the data can happen as soon as the first chunk
arrives.

Refactored the code to help implement. The idea is the "params" are
built in batch and passed to the thread pool which get the actual
results.
The recursive call to get_workers was implemented as it looked like the
original intent of the DTHREADS variable. Otherwise this variable was
redundant. The ThreadPool is a much better use of this setting.
@mcarlton00 mcarlton00 merged commit 4d4f45c into jellyfin:master Feb 21, 2020
@druscoe druscoe deleted the threaded_http_gets branch February 24, 2020 12:27
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.

None yet

2 participants