You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Slow interaction between backgrounding, universal variables, and repainting #8209
fish, version 3.3.1 Linux arch 5.13.7-arch1-1 #1 SMP PREEMPT Sat, 31 Jul 2021 13:18:52 +0000 x86_64 GNU/Linux
First, I do not expect anyone to work on this. It is a largely frivolous bug that effects very few users.
I've been sitting on it for a while, but decided I might as well put it here for informational purposes.
Clean fish, with the following defined in fish_prompt.fish:
# Defined in fish_prompt.fishfunction _refresh_prompt --on-variable foo
commandline--function repaint
endfunctionfish_prompt
fish --command"set -U foo $PWD"&echo$fooend
Here's what it looks like in Fish 3.2.2:
repainting-fast-3.2.2.mp4
In Fish 3.3.1 there seems to be a few hundred millisecond lag:
repainting-slow-3.3.1.mp4
Weirdly enough, this works in Fish 3.3.1, and is perfectly responsive:
backgrounding-working-in-other-shell.mp4
Maybe this means the bug has something to do with pgroups?
Alright so there it is. Unfortunately, I wasn't able to bisect the bug because of a separate bug that happened in between, #8088
The issue here is that we are spawning an instance of fish which sets a uvar and then immediately exits. On Linux, uvar changes are broadcast by writing some data to a pipe, waiting a bit, and then reading it back, but there's no way to read it back if fish has exited. This means data is left on the pipe, so we stay in "polling mode" longer and the poll interval is 100 msec. Well I guess we can reduce it to 10 msec.
No way! You're actually working on it, what a legend! I really, truly appreciate it ❤️
I swear once I take my intro to C class next quarter, I'll try to stop being such a bothersome moocher and start contributing 😄
writing some data to a pipe, waiting a bit, and then reading it back
Forgive my ignorance, but why do we need to read it back? After all, we're the ones who just sent it, so we know what it says 😄
Activity
faho commentedon Aug 13, 2021
cc @ridiculousfish
ridiculousfish commentedon Sep 16, 2021
The issue here is that we are spawning an instance of fish which sets a uvar and then immediately exits. On Linux, uvar changes are broadcast by writing some data to a pipe, waiting a bit, and then reading it back, but there's no way to read it back if fish has exited. This means data is left on the pipe, so we stay in "polling mode" longer and the poll interval is 100 msec. Well I guess we can reduce it to 10 msec.
IlanCosman commentedon Sep 16, 2021
No way! You're actually working on it, what a legend! I really, truly appreciate it ❤️
I swear once I take my intro to C class next quarter, I'll try to stop being such a bothersome moocher and start contributing 😄
Forgive my ignorance, but why do we need to read it back? After all, we're the ones who just sent it, so we know what it says 😄
Reduce named pipe uvar notifier poll time from 100 msec to 10 msec
ridiculousfish commentedon Sep 16, 2021
d607588 should reduce the max delay from 100 msec to 10 msec. I think this is the best we can easily do. Thanks for filing.
CHANGELOG updates for 3.4.0