-
Notifications
You must be signed in to change notification settings - Fork 110
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
Slowdown of initial request to websocket #149
Comments
One quick experiment would be to comment out / remove all the deprecated properties such as |
I doubt this is mopidy-spotify issue. We have known problem with how mopidy itself and pykka interact where creating the initial actor accesses all properties on the core APIs and/or backends. Which triggers playlist lookups of all your playlists, so likely that is to blame. If you try running with a Don't remember what bug in mopidy covers this, but we plan to remove this in the next major release to rectify the API. |
The Is it planned to implement some kind of fix/workaround for this bug? Or it will be fixed in Mopidy 3.x by removal of the |
They are ultimately the same work-around. It will be fixed as part of Mopidy 3.x when we are able to remove deprecated Core APIs, for this issue in particular, removal of |
When mopidy-spotify is enabled the first HTTP request to
/mopidy/ws
takes around 30 seconds (sometimes also a bit less than 30 seconds - e.g. 28786 ms) on Raspberry Pi (original/first) Model B. Most likely this slowdown is less noticeable on more powerful hardware.The CPU usage of
mopidy
process is around 95% during the slow request.There is nothing logged in
mopidy.log
during the slowdown (except the request itself at the end of slowdown).Slowdown also happens when initial request to
/mopidy/ws
is a simple GET instead of proper websocket connection.When mopidy-spotify is disabled (by setting
enabled = false
under[spotify]
inmopidy.conf
) the first request to/mopidy/ws
takes around 1 - 1.5 seconds.Subsequent requests to
/mopidy/ws
take around 10 ms (0.01 second) on server side in both cases.Versions (
pip list | grep -i mopidy
):Mopidy (2.1.0)
Mopidy-AlarmClock (0.1.6)
Mopidy-Dirble (1.3.0)
Mopidy-Mobile (1.8.2)
Mopidy-Moped (0.7.1)
Mopidy-MusicBox-Webclient (2.4.0)
Mopidy-PlaybackDefaults (0.1.1)
Mopidy-Simple-Webclient (0.1.1)
Mopidy-SoundCloud (2.0.2)
Mopidy-Spotify (3.1.0)
Mopidy-Spotify-Tunigo (1.0.0)
Mopidy-TuneIn (0.4.1)
Mopidy-WebSettings (0.1.4.2)
Mopidy-Youtube (2.0.2)
OS - Raspbian Jessie.
The text was updated successfully, but these errors were encountered: