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

Starting new browsers more efficiently #256

Closed
TrueObsidian opened this issue Oct 11, 2021 · 14 comments
Closed

Starting new browsers more efficiently #256

TrueObsidian opened this issue Oct 11, 2021 · 14 comments

Comments

@TrueObsidian
Copy link

My cpu can handle over 30 threads of chrome browsers running a video. But it can't handle the initial spike Chrome unpacking to a new directory. I'm assuming this is because of how it unzips. Is there any way to set the processing power used in the unzipping process?

@MShawon
Copy link
Owner

MShawon commented Oct 11, 2021

I don't know about that.

@josips1999
Copy link

Did anyone found a solution to this? I heard about Laptop issues with RAM caused by small storage

@TrueObsidian
Copy link
Author

Another solution could be to set a delay so everything doesn't open at the same time.

30 threads > 5 browsers open and wait to unzip > next 5 browsers

@josips1999
Copy link

how to set that?

@TrueObsidian
Copy link
Author

I have an idea, but have to learn more about multiprocessing first. @MShawon could probably do this easily.

@josips1999
Copy link

This would be great, and efficient for the program to run smoothly, please update if anyone finds solution

@MShawon
Copy link
Owner

MShawon commented Oct 21, 2021

okay test this and let me know how it goes
youtube_viewer.zip

@TrueObsidian
Copy link
Author

Thank you! Will test soon.

@josips1999
Copy link

is this for windowd or mac?

@MShawon
Copy link
Owner

MShawon commented Oct 22, 2021

For windows, linux, mac

@josips1999
Copy link

josips1999 commented Oct 22, 2021

Works better, this should be the main code, most people have low ram, and even if they don't use laptop, the performance and execution is 10 times better

@josips1999
Copy link

Running 20 treads per 3 minutes, with around 35sec watch time, previously for 20 took me 35 minutes minimum(using 5-7 treads at time)

@ignisc4t
Copy link

👍

@TrueObsidian
Copy link
Author

I saw you added:
factor = int(threads/6) sleep_time = int((str(position)[-1])) * factor sleep(sleep_time)

This works much more efficiently. Now there's no initial lockup when running a large amount of threads.

MShawon added a commit that referenced this issue Oct 27, 2021
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

4 participants