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

Faster Download alias increase ThreadPool size #34

Open
felicijus opened this issue Aug 23, 2023 · 1 comment
Open

Faster Download alias increase ThreadPool size #34

felicijus opened this issue Aug 23, 2023 · 1 comment

Comments

@felicijus
Copy link

felicijus commented Aug 23, 2023

Make it an Option to increase the ThreadPool...

For example: 64 Threads, a bit arbitrary but for me significant faster than with 2 Threads.

def download_profiles(self, user_post_ids: dict, total: List[int]) -> None:
        pool = ThreadPool(64, self.stop_event)
        profiles = self.return_all_subs()
        for username_key in user_post_ids:
            profile = profiles[username_key]
            data = {}
            data["info"] = "Starting download..."
            self.data_display.emit(data)
            pool.add_task(profile.download, self.stop_event, self.data_display,
                          user_post_ids[username_key], total)
@Hashirama
Copy link
Owner

Sure.

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

No branches or pull requests

2 participants