Lurker News

Comments (476) 68 threads

Show all comments

Showing thread 3 of 68

jwilm22 replies#
I'm the author of Alacritty, and I'm here to answer any questions!
h4nkoslo8 replies#
Cool project, but I have literally never thought a terminal was excessively low-performing enough to prevent work from getting done. What applications benefit from a terminal that's even an order of magnitude faster than the alternative?
pcwalton#
Noisy build processes?
jwilm2 replies#
Terminal performance is fine at smaller sizes and with less going on.

In a multi-pane tmux window with vim, performance issues start to become noticeable. Many people I've talked to have experienced a situation where a bunch of output is being written to the screen, they panic to hit C-c, and then all you can do is wait for it to finish. This just isn't an issue with Alacritty.
Alacritty is about having tools that don't get in your way and don't distract you from what you're trying to accomplish.

1_2__3#
That's a lot more to do with Vim that your terminal emulator. It chokes on some files pretty reliably.
ericbb1 reply#
With the C-c issue specifically, I don't think that emulator throughput is the most likely culprit.

It could be that the emulator is not handling inputs fairly: maybe it tries to process all available input from the pseudoterminal before processing the next batch of keyboard input. Or it could be that the pseudoterminal (kernel driver) is not configured to send the signal as expected. Or it could be that the process you're trying to interrupt is not responsive to the signal.
I maintain a terminal emulator that is not optimized at all and I just tested interrupting a process that was dumping one gigabyte of text to the screen. The interrupt was handled instantaneously.

Continue this thread — 1 reply

simlevesque#
> I have literally never thought a terminal was excessively low-performing enough to prevent work from getting done.

Which one do you use ?

frozenport2 replies#
On Windows "std::cout" can take upwards of 3ms. I noticed this when writing high speed camera software that was supposed to hit my callback every 2ms. Instead it was limited by my print statement!

Does this emulator solve my problem?

mrec1 reply#
3ms sounds pretty dire, if you weren't writing very much. Out of curiosity, was this with or without `std::ios::sync_with_stdio(false);` ?

I've found syncing makes a huge difference to IO perf in Windows, e.g. `_getc_nolock` is much faster than `getc`. (Assuming of course that you can get away with it.)

Continue this thread — 1 reply

netheril961 reply#
Windows console is very slow (and terrible in many other ways). I think it is beyond salvageable. The only workarounds is probably write into a disk file or a pipe.

Continue this thread — 1 reply

snuxoll1 reply#
Have you even had Control-C take forever to kill that `cat` you accidentally ran against a 1GB log file? I have. Most terminal emulators are 'dumb' and try to render the whole backbuffer sequentially even if what you are seeing is no longer the tail of the output stream.

It's not so much that this is 'fast' (because even gnome-terminal which is not what I'd call crazy fast is 'fast enough' most days), but that it's much more responsive as a result. By locking the terminal refresh to your screen refresh rate and only rendering 'current' data this removes a lot of headaches you can run into with other terminal emulators (like the aforementioned cat of a 1GB text file).

dom07 replies#
I've done that (we all did), but "can't reproduce". So this seems to depend a lot on the emulator, eg. I'm using Konsole, which is superb, and don't see that problem there.

Continue this thread — 7 replies

dom01 reply#
I've literally never seen this problem.

However, a terminal emulator + X11 and so on can eat a bit of a CPU with noisy processes, eg. the output of mpv eats maybe 5-10 %, because it updates every(?) frame, so maximum work for the whole display stack. Getting the terminal emulator out of sight can get a bit more battery life in these cases.
(Somewhat related: If you have infinite scrollback it turns out that /tmp is actually very finite and can be filled by the wrong command with a couple dozen MB/s.)

detaro1 reply#
Sounds like an option to slow down output rendering to e.g. one 1 frame/s might be an interesting feature for a terminal emulator. Still enough to keep an eye on a long-running process, but less overhead?
rl3#
Smart batching of similar output could be useful as well. Perhaps the ability to configure a similarity threshold.
loeg#
Terminal speed is the primary reason I (and some others) use 'terminology', which is a relatively quick terminal emulator out of the enlightenment project.
jsz0#
It's more of a user comfort / perception thing. Using a slow terminal is basically like playing a game with really inconsistent frame rates. It's a distraction and can cause you to make mistakes from mistimed inputs. In both cases what you're really looking for is consistency more than raw speed.
Manishearth1 reply#
Is split-screen like terminator/iTerm part of the plans?

(Yes, I know tmux and screen exist, I just prefer GUI splitscreen)

jwilm1 reply#
Nope. The idea is that perf should be good enough that it's not necessary.

withoutboats and I are hopefully going to collaborate and add notty protocol support to Alacritty. This should make text splits as performant as GUI splits.

Manishearth1 reply#
My issue with tmux splits is not that it's not fast, it's that GUI stuff like scrolling / selection / etc don't integrate as smoothly.

Continue this thread — 1 reply

ahoka3 replies#
Not really a question, but a request. Given you have a Travis CI setup, could you make binary snapshots available?
jwilm#
This is planned once Alacritty reaches an alpha release. Today's release is considered pre-alpha and is source-only.
valarauca1#
from the readme [1]

    This initial release should be considered to be pre-alpha
    software--it will have issues. Once Alacritty reaches an
    alpha level of readiness, precompiled binaries will be
    provided for supported operating systems.
[1] https://github.com/jwilm/alacritty
vvanders1 reply#
Very cool, how are you handling glyphs? Do you have an LRU font cache or something simpler?
jwilm11 replies#
Glyphs are rasterized once and stored in a texture atlas. When rendering a glyph, the fragment shader pulls from that texture. Once loaded, the glyph stays loaded for the duration of the program.

Continue this thread — 11 replies

Continue this thread — 18 more replies