Terminal and shell performance
I love the analysis of terminal latencies! And I&#x27;m in full agreement with the overall goal of less latency everywhere. But, of course, I feel like picking a few nits.<p>&gt; And it turns out that when extra latency is A&#x2F;B tested, people can and do notice latency in the range we’re discussing here.<p>Yes, this is true. But the methodology is important, and the test used doesn&#x27;t really apply to typing in terminals. The test isn&#x27;t a &quot;type and see if you can tell it&#x27;s slow&quot; test, it&#x27;s a hit the mark hand-eye coordination test, something you don&#x27;t do when typing text. Latency when playing Guitar Hero is super duper important, way more important than most other games, which is why they have a latency calibrator right in the game. Latency when playing a Zelda game is a <i>lot</i> less important, but they still try very hard to reduce latency.<p>The same people who can distinguish between 2ms of difference in a drum beat also can&#x27;t distinguish between an extra 30ms of response time when they click a button in a dialog box.<p>I&#x27;d like to see a stronger justification for why lower latency in a terminal is just as important as it is for hand-eye coordination tasks in games.<p><pre><code>  ~2 msec (mouse)
  8 msec (average time we wait for the input to be processed 
  by the game)
  16.6 (game simulation)
  16.6 (rendering code)
  16.6 (GPU is rendering the previous frame, current frame 
  is cached)
  16.6 (GPU rendering)
  8 (average for missing the vsync)
  16.6 (frame caching inside of the display)
  16.6 (redrawing the frame)
  5 (pixel switching)
</code></pre>
I find this list pretty strange. It&#x27;s generally right - there are a bunch of sources of latency. But having done optimization for game consoles for a decade, this explanation of game latency feels kinda weird.<p>Games that actually run at 60fps usually do not have greater than 100ms latency. They also don&#x27;t miss vsync every other frame on average, that 8ms thrown in there looks bizarre to me. Render code and GPU rendering are normally the same thing. Both current and previous frame GPU rendering is listed, huh? Sim &amp; render code run in parallel, not serially. The author even said that in his article, but lists them separately... ?<p>Consumer TVs come with like 50ms of latency by default. That&#x27;s often half of it right there. Games are often triple-buffered too, that accounts for some of it. The ~2ms right at the top belongs in the 8ms wait, it disappears completely.<p>I just get the feeling the author of this list was trying hard to pad the numbers to make his point, it feels a like a very hand-wavy analysis masquerading as a proper accounting of latency.