ChrisTitusTech / linutil

Chris Titus Tech's Linux Toolbox - Linutil is a distro-agnostic toolbox designed to simplify everyday Linux tasks.
https://christitus.com
MIT License
2.85k stars 227 forks source link

tui is noticably laggy with mouse interaction #936

Closed nnyyxxxx closed 1 week ago

nnyyxxxx commented 2 weeks ago

title

nnyyxxxx commented 2 weeks ago

needs reverted, or optimized, needs a toggle as well

nnyyxxxx commented 2 weeks ago

it lags without keyboard interaction as well, its just more noticeable with keyboard interaction

nnyyxxxx commented 2 weeks ago

actually to rephrase this it lags extremely badly while the mouse is moving and not still

nnyyxxxx commented 2 weeks ago

to reproduce:

move mouse up and down and scroll with either the keyboard or scroll wheel

nnyyxxxx commented 2 weeks ago

the cpu usage with this feature is crazy, i think this should just be reverted

jeevithakannan2 commented 2 weeks ago

Cannot reproduce

nnyyxxxx commented 2 weeks ago

that's fine, but i clearly can and it's clearly noticeable on both release and debug

lj3954 commented 1 week ago

the cpu usage with this feature is crazy, i think this should just be reverted

Different than from holding a key? I see just about identical CPU usage (~30% of a single Ryzen 7900x core) rapidly scrolling with a mouse & with a keyboard on a debug build.

The difference in resource utilization between mouse and keyboard interaction really should be negligible. The majority of the impact is from redrawing, since ratatui is an immediate mode library.