<dnkl>
with a large scrollback, text reflow takes time
<dnkl>
in this case, enough time that we don't process the incoming mouse motion events quickly enough
<dnkl>
the compositor fills the socket and then kills the connection
<Arsen>
that would make sense, yeah
<Arsen>
running with WAYLAND_DEBUG=1, I see that it's still processing a bunch of xdg_toplevel@27.configure(...)s after the compositor closed the window already
<dnkl>
difficult problem to solve. With literally can't receive the Wayland events while resizing the window.
<Arsen>
my (perhaps too abstract to be useless) idea for a solution is reflowing text only when the user is trying to view it from scrollback
<Arsen>
though, text handling is one of those thing's I'm especially bad at, so I can't tell how possible it'd be to implement that
<Arsen>
s/thing's/things
<dnkl>
won't work. reflow has to start from the start of the scrollback. you can't do a partial reflow starting at the bottom
<w0rm>
dnkl: how about delaying reflow when resize happens
<dnkl>
might be possible to stash the original contents when a resize is started, and only truncate, not reflow, *while* resizing. and then reflow at the end, when resize is done
<dnkl>
w0rm: 😂
<Arnavion>
Not reflowing until the resize ends would be very annoying
<w0rm>
yeah, I suppose so...
<dnkl>
yeah, I know...
<Arnavion>
Can the reflow algorithm work backwards one \n-delineated span at a time?
<Arsen>
maybe only reflowing top_of_screen - row_number / 2 lines and letting the rest get reflown properly later?
<dnkl>
we could handle it the same way we handle WINSZCH; do it after a timeout. You can see the effect of this by quickly resizing the window in e.g vim.
<Arsen>
with that being hopefully enough to hide any bad resizing
<Arsen>
er, I put that formula poorly
<Arsen>
start from top_of_screen - row_number / 2
<dnkl>
the problem is how to track the source content over multiple quick resizes, when only reflowing parts of it
<dnkl>
I think the "delay" solution can wor, if the delay is sufficient small. I could try writing up a POC
<Arsen>
by operating on a copy maybe? with that hopefully not being too large to copy quickly
<Arsen>
and only reflowing the whole thing on a delay
<dnkl>
Yeah, keep a copy of the original content *while* resizing. First iteration of the solution would just truncate, then reflow after a delay, or when resize is done.
<dnkl>
Later iterations can experiment with partial reflow, to improve user experience
<Arsen>
yeah, that's fair
<Arsen>
thanks btw
<dnkl>
copying is not an issue - we're already doing that. It's just a matter of not free:ing the original content
Ordoviz has joined #foot
an3223 has joined #foot
an3223 has quit [Ping timeout: 258 seconds]
an3223 has joined #foot
an3223 has quit [Ping timeout: 258 seconds]
talismanick has quit [Ping timeout: 244 seconds]
midgard has quit [Quit: Bye]
lbia has joined #foot
<dnkl>
Arsen: fwiw, I just tested kitty, and it uses the exact same method.
<dnkl>
I have a POC the does work, and greatly improves performance. For very large grids, there's still a noticable delay when starting the resize, caused by copying the original grid. I think we can get rid of that too, but requires more work
midgard has joined #foot
jao has joined #foot
rodrgz has joined #foot
ayushnix has joined #foot
ayushnix has joined #foot
ayushnix has quit [Changing host]
jao has quit [Ping timeout: 264 seconds]
lbia has quit [Quit: lbia]
ayushnix has quit [Ping timeout: 252 seconds]
ayushnix has joined #foot
ayushnix has joined #foot
ayushnix has quit [Changing host]
caveman has quit [Remote host closed the connection]
caveman has joined #foot
jao has joined #foot
lbia has joined #foot
talismanick has joined #foot
Ordoviz has quit [Quit: WeeChat 3.6]
talismanick has quit [Ping timeout: 268 seconds]
rodrgz has quit [Quit: WeeChat 3.5]
an3223 has joined #foot
an3223 has quit [Ping timeout: 258 seconds]
an3223 has joined #foot
talismanick has joined #foot
an3223 has quit [Remote host closed the connection]