by janvdberg on 7/30/24, 10:04 PM with 55 comments
by vijucat on 7/31/24, 4:26 AM
"By executing this command, you are effectively replacing the first byte of the `NtUserSetLayeredWindowAttributes` function with a `ret` instruction. This means that any call to `NtUserSetLayeredWindowAttributes` will immediately return without executing any of its original code. This can be used to bypass or disable the functionality of this function"
(Thanks to GitHub Copilot for that)
Also see https://learn.microsoft.com/en-us/windows-hardware/drivers/d...
by txdv on 7/31/24, 6:01 AM
by aardshark on 7/31/24, 2:42 AM
by pcthrowaway on 7/31/24, 5:58 AM
The journey was very useful, even the destination may be pretty specific to your needs. The process of how to go about debugging minor annoyances like this is really hard to learn about.
by zokier on 7/31/24, 5:33 PM
My very unscientific methodology was to run
$ echo hello && foot
in a terminal and measure the time between the hello text appearing and the new window appearing. Looking at my video, the time from physical key press to "hello" text appearing might be 20ish ms but that is less clear, so about 100 ms total from key press to shell prompt.This is pretty much completely untuned setup, I haven't done any tweaks to improve the figures. Enabling foot server might shave some milliseconds, but tbh I don't feel that's necessary.
It'd be fun to do this with better camera, and also with better monitors. Idk how difficult it would be to mod in some LED to keyboard to capture the exact moment the key is activated, just trying to eyeball the key movement is not very precise.
by mberning on 7/31/24, 2:54 AM
by abraae on 7/31/24, 1:58 AM
However I was interested in knowing whether it does for the author.
Assuming he/she does suffer this 1300 ms delay "hundreds" of times a day (let's say 200) and for the sake of argument they use their computer 300 days a year and have 20 years of such work ahead of them with this config, then this inefficiency will total 1300 x 200 x 300 x 20 / 1000 / 60 / 60 hours wasted during author's lifetime - some 430 hours.
So well worth the effort to fix!
by jd3 on 7/31/24, 3:52 AM
When I used to use Windows 10+ years ago, I had decent luck using xming + cygwin + Cygwin/X + bblean to run xterm in a minimal latency/lag environment.
I also launch Chrome/Spotify/Slack desktop using:
$ open -a open -a Google\ Chrome --args --disable-gpu-vsync --disable-smooth-scrolling
by Borg3 on 7/31/24, 8:56 PM
Anyway, this also made me think about general bloat we have in new OSes and programs. Im still on old OS running spinning rust and bash here starts instantly when cache is hot. I think GUI designers lost an engineer touch...
by aardshark on 7/31/24, 2:42 AM
by tonymet on 7/31/24, 7:31 PM
Great debugging work to come up with a solution!
by pikseladam on 7/30/24, 11:16 PM
by aftbit on 7/30/24, 11:38 PM
$ hyperfine 'alacritty -e true'
Benchmark 1: alacritty -e true
Time (mean ± σ): 84.1 ms ± 4.9 ms [User: 40.1 ms, System: 30.8 ms]
Range (min … max): 80.5 ms … 104.4 ms 32 runs
$ hyperfine 'xterm -e true'
Benchmark 1: xterm -e true
Time (mean ± σ): 81.9 ms ± 2.6 ms [User: 21.7 ms, System: 7.9 ms]
Range (min … max): 74.9 ms … 87.1 ms 37 runs
$ hyperfine 'wezterm -e true'
Benchmark 1: wezterm -e true
Time (mean ± σ): 211.7 ms ± 13.4 ms [User: 41.4 ms, System: 60.0 ms]
Range (min … max): 190.5 ms … 240.5 ms 15 runs