1. 33

  2. 12

    I’d always hoped we close the latency gap over time, but computing seems to be heading in the opposite direction. Similarly, the speed advantage once conferred by SSD’s seems to be dripping away. I suppose each app having its own copy of Chromium doesn’t help things here.

    1. 4

      It’s just parkinson’s law applied to CPU.

      Devs just pile on code until the program is unbearably slow then they do just enough to nudge it back to the bearably slow area and rinse/repeat.

      Any hardware gain just gives devs a couple extra months of lazily piling on code until he has to actually nudge it back again.

      I mean people are writing desktop apps in JS using a browser as an abstraction layer.

      1. 2

        kinda OT but I really wish Firefox OS had taken off enough to where “web apps” could just be the default state of things.

        There’s nothing inherently silly with the browser tech stack to have everything be based off of it, except perhaps Javascript (though that’s getting solved with asm.js-style things)

      2. 6

        This is pretty cool. Measuring end to end latency is exactly the latency observed by the user. Hard to measure programmatically, though.

        For fun, I measured input latency in my mail client with ktrace. From one kevent waiting for a keypress to the next. In between there’s a few read() calls to read the keystroke, and a write() to update the terminal. All told, it’s about .000441 or .000361 seconds or so. So compared to 100ms or more, I think half a ms is pretty damn responsive. :)

        Of course, there’s input and output lag on either end of that. According to the video I recorded, it seems to be about 90ms end to end. Hard to say, because between the overall darkness of the video and camera shake, I can’t really tell when I pressed the button. In any case, since my code’s time spent processing is less than 1% of the total time, I can probably relax instead of trying to further optimize it.

        1. 5

          I wonder how much latency is the result of conversations that go something like:

          • Developer 1: This is kind of an expensive algorithm, should we optimize it?
          • Developer 2: It’s nothing compared to the network latency, so don’t bother.
          • Repeat for each computation.
          1. 15

            You forgot the cringe-inducing “premature optimization is the root of all evil” thought-terminating quip by developer 3.

          2. 5

            I’d love a platform that prevented you from publishing an app if the latency of the UI thread ever exceeded 50ms. Excepting a GC, that is a huge amount of time.

            1. 2

              Virtual reality applications and console games have limitations like this. In VR usually the limit is 16 or 11 ms and with console games its usually 33 or 66 ms.

          3. 3

            The most hilarious part is that mac built-in keyboards are 40ms slower than external keyboards

            1. 1

              One possible reason for differences in results is the amount of battery/power being drawn by other apps when the camera is running. I would try to always use the app with the battery more than 80% charged, and with the radio/wifi off. Ideally it would also be plugged in to the charger at the time.