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

Improv patch 1 multithreading #11

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

MisaelKelviny
Copy link
Collaborator

This PR changes the download function for the Flickr and bing search class. Was added a new way to multithreading the data URL's for a fast download increasing a way better performance with big image searches.

To test the improvement, first Initializing the IDT and create all needed parameters, and after that build the dataset requested, the time will be faster than usual, by the multithreading all download subprocess will work to download the images.

In local tests, this was the result of some ways to download a sample of just one class and a sample of 100 images sample per search in the changed classes. The "normal" represents the time without the multithreading, and others with the tests max_workers of threads run simultaneously like 5 and 10.

  • duckgo -
    5 threads - 1:36
    10 threads - 1:48
    Normal - 04:05

  • bing -
    5 threads - 1:06
    10 threads - 0:49
    Normal - 03:52

before start the build
image

after start the build
image

the use of multithreading on a pc with 8gb RAM like mine, don't have negative effects, the tools work great!

This PR change the download function for the flickr and bing search
class. Was added a new way to multithreading the data URL's for a fast
download increasing a way better performance with big images searchs.
This PR change the download function for the flickr and bing search
class. Was added a new way to multithreading the data URL's for a fast
download increasing a way better performance with big images searchs.

To test this change just run the idt init with all needed parameters
and run idt build at the end, download time will be
more faster than usual.
Change functions to add a multithread way to increase the
download speed and performance, change just the duckgo and bing classes,
others classes whos need a API key was not changed.
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.

1 participant