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

Adding Multithreading #20

Merged
merged 4 commits into from Mar 20, 2022
Merged

Adding Multithreading #20

merged 4 commits into from Mar 20, 2022

Conversation

Emersont1
Copy link
Owner

@Emersont1 Emersont1 commented Mar 9, 2022

hey all

I know this is gaining some traction at the moment, so I thought I'd add some multithreading to try and make it run faster / more efficiently

I'm not going to merge this in until I've had several people test this, so I'd appreciate feedback in the comments

Installing:

# clone the repo
git clone https://github.com/Emersont1/itchio

# checkout to multithreading
cd itchio
git checkout multithreading

# create and load a venv
python -m venv venv
source venv/bin/activate

# install
pip install .

# profit?
python -m itchiodl.downloader -k INSERT_API_KEY_HERE

@mkolassa
Copy link

This ended up working great for me. Downloaded 768GB at 100MB/s with the default 4 threads.

@Emersont1
Copy link
Owner Author

Emersont1 commented Mar 14, 2022

I'm assuming that is faster than in single-thread mode?
I don't think it's worth adding unless there's a measurable speed boost (as the progress bars are removes)

@mkolassa
Copy link

I was only getting about 30MB/s with the single thread version.

@Emersont1 Emersont1 added this to the 1.3 Release milestone Mar 16, 2022
@lem6ns
Copy link

lem6ns commented Mar 18, 2022

Having too much jobs set causes ratelimiting (8 works fine, 10 starts giving errors)

@Emersont1
Copy link
Owner Author

I'll add that into the documentation

@Emersont1 Emersont1 changed the base branch from main to v2-main March 20, 2022 16:08
@Emersont1 Emersont1 merged commit 1702537 into v2-main Mar 20, 2022
@Emersont1 Emersont1 deleted the multithreading branch March 27, 2022 00:09
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

3 participants