mpris: reduce command latency in event loop#757
Open
iamcvr wants to merge 1 commit intoclangen:masterfrom
Open
mpris: reduce command latency in event loop#757iamcvr wants to merge 1 commit intoclangen:masterfrom
iamcvr wants to merge 1 commit intoclangen:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Context
This targets reported lag when controlling musikcube over MPRIS/playerctl (see issue #551).
Testing
Baseline validation (control path overhead)
Command:
bash -lc 'set -x; date +%s.%3N; time qs -c noctalia-shell ipc call media playPause; date +%s.%3N; playerctl -l; playerctl -p musikcube.instance791874 status'Observed:
qs ... playPause: real 0m0.020s (~20ms)Before patch (system musikcube build)
Command:
bash -lc 'for i in {1..8}; do echo "---- $i ----"; time playerctl -p musikcube.instance791874 play-pause; time playerctl -p musikcube.instance791874 status >/dev/null; done'Observed:
playerctl ... play-pause: typically ~2.5s (e.g. 2.500s, 2.560s, 2.603s)playerctl ... status: consistently ~0.5s (e.g. 0.500s, 0.509s, 0.551s)Direct DBus reproduction (no playerctl wrapper)
bash -lc 'for i in {1..5}; do echo "== $i =="; time busctl --user call org.mpris.MediaPlayer2.musikcube.instance791874 /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player PlayPause; time busctl --user get-property org.mpris.MediaPlayer2.musikcube.instance791874 /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player PlaybackStatus >/dev/null; done'Observed:
PlayPause: 0.399s, 2.098s, 1.500s, 2.099s, 2.000sPlaybackStatus: mostly 0.500s (one 1.000s)After patch (local build)