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

FIX for high cpu usage #9

Closed
houdang opened this issue Mar 8, 2016 · 3 comments
Closed

FIX for high cpu usage #9

houdang opened this issue Mar 8, 2016 · 3 comments

Comments

@houdang
Copy link

houdang commented Mar 8, 2016

Hi their,

the program uses 100% cpu load and can be fixed easily.. but im not into C#.
Can someone have a look on this topic and include thos 4 lines of code?

http://www.streamwhatyouhear.com/forums/topic/fix-for-high-cpu-usage/

Thanks !!

@sebastienwarin
Copy link
Member

Hi houdang,
How I can reproduce this behavior ?
Thx

@houdang
Copy link
Author

houdang commented Mar 9, 2016

I simply start the program and start sending.. that's all. cpu goes then high after some minutes.
The server is running linux with kodi. solution should be the one above in the link i posted.

Thanks ! And greeting from Nuremberg ;-)

@sebastienwarin
Copy link
Member

Hey,

I use SWYH since 15 minutes, with 5 connected clients. I try to disconnect & reconnect clients but the CPU usage is always about 510%, otherwise 02% (idle time with no connection).

image

I used VLC as client for the test but if I use Kodi, I can reproduce the bug :) In fact, Kodi (and other client ???) create multiple connection to SWYH that raise the OnStreamDone event more times with the same SessionID. So in my code the first time I successfully removes the session but then I wait indefinitely to remove a session that no longer exists (without sleep = busy loop = high cpu usage) !

I don't use the code of slash from the forum to fix that, I just added a condition to remove the session if it exists ;)

Tell me if it's OK for you to close this issue.

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