I don't really know how to eliminate my own biases here, but a quick test shows that the new prompt feels very much like the old one if I add a little latency manually:
PROMPT="\$(prettyprompt \$?)"
PROMPT="\$(sleep 0.04; prettyprompt \$?)"
With the second one, I can always see a frame or two where the cursor is already on the next line where the prompt will go, before the prompt actually shows up.Presumably the test would be whether he can, in a blind experiment, reliably discriminate between them.
Re:Latency matters
by alecbenzer on Sunday August 20, 2017 @07:23PM
(#15060758)
Yeah -- seems like it'd be a bit tricky to set up, but would be super interesting to see the results.
edit: Tried something out: https://github.com/AlecBenzer/terminal-latency Had 92% accuracy differentiating 10ms from 100ms out of 28 tries
Re:Latency matters
by richdougherty on Monday August 21, 2017 @04:12AM
(#15062793)
Nice!
No, you can easily measure this stuff with "time". It was 75ms vs 3ms for python vs go... this is for some custom prompt he wrote, so this is the time it takes to get the new prompt every time he was pressing return. I don't think it's that big a deal, if it was navigation keys in a text editor then it's a big deal, but when you hit return you are usually executing something much longer than ~50ms anyway so it's not an overhead that's going to multiply that much.
Not that I think he should bother doing this, I'm just being the fun police. :)