-
-
Notifications
You must be signed in to change notification settings - Fork 72
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
Use multithreading to fetch json faster #41
Use multithreading to fetch json faster #41
Conversation
I do agree that it does take some time to download the JSONs from SplatNet 3, but I'm not sure if using multithreading to speed it up is a good idea. We're walking a fine line in terms of accessing SplatNet 3, and I think going any faster with our requests might raise some red flags. I don't want to risk anyone's account getting banned. |
@clovervidia I totally understand your concern. I was thinking that when opening a webpage using a modern web browser, it would be a normal strategy for the browser to send dozens of requests at background and preload the links in that page. So I assumed a small number for the But it's up to you to make the decision, I'm absolutely OK with it. After all, the |
Sorry for the late reply, I've been traveling. I agree with @clovervidia that we don't want to do anything that the official app can't do. If we add multithreading, limiting the concurrent threads to 2 would probably be best. I don't think this should necessarily be closed – but @clovervidia and I should probably discuss further. |
Yeah, we should probably discuss this. Limiting it to 2 or 3 threads might be all right. |
Please feel free to reopen this PR or keep it closed for now, which ever you wish. |
I really like the idea of using threads. After I got the whole thing working, I think I prepared a PR to make it that way too. |
Thanks a lot for keeping this updated @CafeAuLait-CC! Will probably limit the number of threads to 2 but will plan to take another closer look by this weekend and hopefully get a version of this merged in. |
Cool! I have just updated it and set the number to 2. Feel free to squash the commits when you are merging it. |
So sorry to make you keep having to fix the merge conflicts. 😅 What is really holding things up is that I have a ton of local changes that aren't public/present in Just, for now, I'm wary (really due to my own lack of Git confidence, sorry) about merging this and then having to try and pull these new upstream changes into my own non-committed/draft local version of the codebase… I think stuff would just get messy. But as soon as v0.2.0 goes out I will pull this in with it! |
Also, would you mind explaining what's going on with the "passing in lists the length of Relatedly, why is Never done anything with concurrency in Python, really, so just for my own understanding if you have the time to just give a quick explanation that'd be cool! |
Don’t worry and take your time, I’m looking forward to seeing the new features like supporting for Salmon Run and Tri-color Turf War(in Hina’s plan) come out. Most of the conflicts are in the As for your questions, the
The So I’m not sure whether my explanation is clear enough. You can find a simple example of using And the reason |
ok lol looks like i still made the commit history super gross when merging the thank you, @CafeAuLait-CC, and for your explanation above as well, super appreciated! :) |
lol Thank you! And great to see v0.2.0 finally comes out! |
Hello,
As s3s and stat.ink are both under active development, I'm still using the
-o
parameter to backup my data to local files quite often. Since thefetch_json()
for ALL data is now taking forever to run, I added multithreading support for it.I tried to set the
max_workers
to 10, and the total running time for me with the-o
parameter has dropped from 4m45s to 45 seconds. So I hope this is useful.