TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Troubleshooting: Terminal Lag

227 点作者 janvdberg10 个月前

13 条评论

vijucat10 个月前
Love such articles where I learn something new. cdb is completely new to me. It&#x27;s apparently the Microsoft Console Debugger. For others like me who were wondering how `eb win32u!NtUserSetLayeredWindowAttributes c3` neutered the window animation:<p>&quot;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&quot;<p>(Thanks to GitHub Copilot for that)<p>Also see <a href="https:&#x2F;&#x2F;learn.microsoft.com&#x2F;en-us&#x2F;windows-hardware&#x2F;drivers&#x2F;debuggercmds&#x2F;e--ea--eb--ed--ed--ef--ep--eq--eu--ew--eza--ezu--enter-values-" rel="nofollow">https:&#x2F;&#x2F;learn.microsoft.com&#x2F;en-us&#x2F;windows-hardware&#x2F;drivers&#x2F;d...</a>
评论 #41116673 未加载
txdv10 个月前
So the root cause of the slowness was not found, it was just circumvented by keeping 3 xterms open and just using hiding&#x2F;showing them?
评论 #41120058 未加载
aardshark10 个月前
300ms for startup still sounds slow to me. Not ridiculously so, but it won&#x27;t give that snappy feeling.
评论 #41116148 未加载
评论 #41117600 未加载
pcthrowaway10 个月前
&gt; I’ve been using this configuration for a few days, so far it’s working great. I haven’t noticed any issues running it this way.<p>The journey was <i>very</i> useful, even the destination may be pretty specific to your needs. The process of <i>how to go about debugging</i> minor annoyances like this is really hard to learn about.
zokier10 个月前
Just for fun I did film some video footage from my 60Hz monitor to see how quickly my terminal starts up. Seems like 2-3 frames to show up the terminal window, and 1-2 frames to show shell prompt. So 50 ms - 83 ms. This is with foot terminal on Sway.<p>My very unscientific methodology was to run<p><pre><code> $ echo hello &amp;&amp; foot </code></pre> 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 &quot;hello&quot; text appearing might be 20ish ms but that is less clear, so about 100 ms total from key press to shell prompt.<p>This is pretty much completely untuned setup, I haven&#x27;t done any tweaks to improve the figures. Enabling foot server might shave some milliseconds, but tbh I don&#x27;t feel that&#x27;s necessary.<p>It&#x27;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.
评论 #41123753 未加载
mberning10 个月前
This is a tour de force on the type of curiosity it takes to be really successful with computers.
abraae10 个月前
I&#x27;m at the tail end of my career, so working on efficiency gains like this doesn&#x27;t usually add up for me.<p>However I was interested in knowing whether it does for the author.<p>Assuming he&#x2F;she does suffer this 1300 ms delay &quot;hundreds&quot; of times a day (let&#x27;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 &#x2F; 1000 &#x2F; 60 &#x2F; 60 hours wasted during author&#x27;s lifetime - some 430 hours.<p>So well worth the effort to fix!
评论 #41115847 未加载
评论 #41116722 未加载
jd310 个月前
I&#x27;m so distracted by latency that I run my macOS with vsync disabled 24&#x2F;7 (through Quartz Debug).<p>When I used to use Windows 10+ years ago, I had decent luck using xming + cygwin + Cygwin&#x2F;X + bblean to run xterm in a minimal latency&#x2F;lag environment.<p>I also launch Chrome&#x2F;Spotify&#x2F;Slack desktop using:<p>$ open -a open -a Google\ Chrome --args --disable-gpu-vsync --disable-smooth-scrolling
评论 #41116404 未加载
评论 #41116348 未加载
Borg310 个月前
Very nice article, I love such debugging. I sometimes do it myself too.<p>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...
aardshark10 个月前
300ms for startup still sounds slow to me. Not ridiculously so, but it won&#x27;t give that snappy feeling.
tonymet10 个月前
We need a community of those obsessed with responsive applications. UI latency irks me on every device. Not only computers and smart phones, but now TVs, refrigerators, cars all have atrocious UI latency.<p>Great debugging work to come up with a solution!
pikseladam10 个月前
it was a fun read
aftbit10 个月前
Upvote just for teaching me about the existence of `hyperfine`.<p><pre><code> $ hyperfine &#x27;alacritty -e true&#x27; 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 &#x27;xterm -e true&#x27; 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 &#x27;wezterm -e true&#x27; 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</code></pre>
评论 #41115633 未加载
评论 #41125470 未加载
评论 #41115987 未加载
评论 #41117565 未加载
评论 #41116140 未加载
评论 #41115740 未加载