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

Use threads #274

Closed
bilelmoussaoui opened this issue Jan 3, 2017 · 2 comments
Closed

Use threads #274

bilelmoussaoui opened this issue Jan 3, 2017 · 2 comments
Assignees
Milestone

Comments

@bilelmoussaoui
Copy link
Owner

In order to improve the speed of the script, and as we moved to a more OOP code. I think it's might be cool that each application has its own thread that will fix it icons and kill itself after that.

@bilelmoussaoui bilelmoussaoui added this to the v3.7 milestone Jan 3, 2017
@bilelmoussaoui bilelmoussaoui self-assigned this Jan 3, 2017
@bilelmoussaoui
Copy link
Owner Author

bilelmoussaoui commented Jan 3, 2017

On master, here's the difference before threads and after :p
before :
sudo -E python3 script.py 37,13s user 7,43s system 220% cpu 20,227 total
after :
sudo -E python3 script.py 0,83s user 0,07s system 46% cpu 1,945 total
And here's a list of the applications that was fixed

Caprine             [###.....................................] 6/70 8.6%
Chromium            [####....................................] 7/70 10.0%
Dropbox             [#######.................................] 13/70 18.6%
Google Chrome       [########................................] 14/70 20.0%
Megasync            [##########..............................] 18/70 25.7%
Skype               [###########################.............] 48/70 68.6%
Spotify             [#################################.......] 57/70 81.4%
Steam               [#################################.......] 58/70 82.9%
Stremio             [##################################......] 59/70 84.3%
Teamviewer          [#####################################...] 65/70 92.9%
Telegram            [#######################################.] 68/70 97.1%
Wire                [########################################] 70/70 100.0%

@varlesh you might want to give this a try :p

@bilelmoussaoui
Copy link
Owner Author

Removed the threads for now! it causes too many issues (the threads were used as daemons, and they are killed once the script is done, which causes too many problems with the execution of the script..).
I don't have any idea how to get this done for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant