News for hackers. Stuff that matters.
Re:Typing with pleasure by falcolas on Friday December 25, 2015 @09:10AM (#10791262)
I really enjoyed that write up. The only piece I would love to see added would be the addition of emacs and vim in a native console.
Re:Typing with pleasure by legulere on Friday December 25, 2015 @09:42AM (#10791331)
Yep, I once had just a native console open when installing linux freshly and the lag was so low that I immediately felt how much better it was and that it made me think about lag.
Re:Typing with pleasure by gabesullice on Friday December 25, 2015 @10:26AM (#10791420)
I use terminal based Vim exclusively and now I'm completely spoiled. Every other interface seems ridiculously "laggy". I don't know if it's just a psychological thing or something more like the SpeechJammer, but if I type at a co-workers computer I will sometimes completely lock up and be unable to type for a second or two.
Re:Typing with pleasure by netmask on Friday December 25, 2015 @11:31AM (#10791566)
I really don't think that is a psychological thing, i ben using emacs in the terminal for years and only within Apples default Terminal application because iTerm is really laggy on linux i prefer terminology that is really really fast
Re:Typing with pleasure by vegabook on Saturday December 26, 2015 @01:39PM (#10794800)
+1 for terminology. Fast even on the cubieboard that I (also) run it under, and somehow, in my opinion, it does font spacing really well even under Ubuntu. Better than the standard terminal in both Unity and (especially) Gnome where kerning can be weird even on mono font.
Re:Typing with pleasure by copperx on Friday December 25, 2015 @11:10AM (#10791512)
No framebuffer, right? In my experience, the framebuffer introduces an annoying and noticeable delay.
Re:Typing with pleasure by frankling on Friday December 25, 2015 @12:13PM (#10791661)
I just did quick measurements for vim 7.4 and emacs 23.4.1 in xterm, rxvt/urxvt, and gnome-terminal. The results depend most strongly on the terminal type. emacs' latency is always a bit (0.1-0.3ms or so) lower than vim's. Apart from that, xterm was around 1.1ms, (u)rxvt around 17.5ms, and gnome-terminal around 26.2ms. I wonder where the delay in rxvt compared to xterm comes from.
Re:Typing with pleasure by ubercow13 on Friday December 25, 2015 @01:01PM (#10791804)
Depending how you're measuring it, I believe it could be because urxvt's output is buffered by default whereas xterm's isn't. That may mean 16.7ms (= 1 second / 60Hz) is added to the measured latency, though the extra time would have no effect in practice.

ed: or maybe thats excluded from the measurement but urxvt is double buffered by default?

Re:Typing with pleasure by frankling on Friday December 25, 2015 @01:35PM (#10791900)
You're right, urxvt refreshes at a maximum of 60Hz (line 1021 in http://cvs.schmorp.de/rxvt-unicode/src/command.C?view=markup). Above, I mistakenly measured only urxvt. Rxvt does a select() with a timeout of 5ms before redrawing (lines 1600 and 1664 in "src/command.c"). The total latency with rxvt is about 5.7ms.
Re:Typing with pleasure by barrkel on Saturday December 26, 2015 @11:43AM (#10794482)
One of the bigger problems with emacs is its font highlighting mechanism - typically it's implemented with regular expressions adding stacked attributes to text. Lexical highlighting using a state machine, with state recorded at line start would be much much faster - like, multiple 1000x faster. Emacs pays for its flexibility with massive performance loss.

Compare something like joe editor (the jmacs named executable has emacs-like key bindings) for syntax highlighting; it's night and day. Joe uses state machines (DFA) in a text description format for syntax highlighting. That means that strictly it can only do lexical highlighting, but that's much much better than nothing - and fully correct syntax highlighting requires a deeper analysis than is normally done in emacs modes.

Joe itself would be much faster again if the state machine was compiled to machine code.