Live data from Hacker News

Xi-Editor Retrospective

raphlinus.github.io

81–90 of 162 posts

Re: Xi-Editor Retrospective

#81
post #80

On the github page https://github.com/xi-editor/xi-editor : JSON. The protocol for front-end / back-end communication, as well as between the back-end and plug-ins, is based on simple JSON messages. I considered binary formats, but the actual improvement in performance would be completely in the noise. Using JSON considerably lowers friction for developing plug-ins, as it’s available out of the box for most modern la…

Yes. In this discussion and on Reddit, people still talk about binary vs textual as the source of the problem, but I've argued (based on empirical data) that the lexical details are not the reason for the performance problems.

Also, Swift is marketed as a fast language (also based on LLVM), yet in my measurements it's 20x to 50x slower than Rust for JSON processing. I found that surprising. Would you not?

Re: Xi-Editor Retrospective

#82
post #32

The assertion that gpu is required for good text rendering caught me off guard. I can't claim it is wrong, but it does feel like it should be wrong.

I sure wish it were wrong. If macOS’s text rendering primitives could be used asynchronously or concurrently the situation would be significantly better. I’ve spent probably hundreds of hours trying to make it fast but I’m convinced it’s only possible if you work at Apple (as they have done quite well with Terminal by using lots of hacks that are unavailable to me)

(As a person who just looked away from a nearly full-screened 4k iTerm2 running the metal renderer, thank you for your efforts)

Re: Xi-Editor Retrospective

#84
post #32

The assertion that gpu is required for good text rendering caught me off guard. I can't claim it is wrong, but it does feel like it should be wrong.

I think the point being made is that it is required for fast text rendering.

Still feels like that should not be the case. What changed so heavily in the last decade? 2d rendering used to be hella fast without the gpu. Right?

Re: Xi-Editor Retrospective

#85
post #80

On the github page https://github.com/xi-editor/xi-editor : JSON. The protocol for front-end / back-end communication, as well as between the back-end and plug-ins, is based on simple JSON messages. I considered binary formats, but the actual improvement in performance would be completely in the noise. Using JSON considerably lowers friction for developing plug-ins, as it’s available out of the box for most modern la…

Yes. In this discussion and on Reddit, people still talk about binary vs textual as the source of the problem, but I've argued (based on empirical data) that the lexical details are not the reason for the performance problems. Also, Swift is marketed as a fast language (also based on LLVM), yet in my measurements it's 20x to 50x slower than Rust for JSON processing. I found that surprising. Would you not?

I agree with you, it's weird that Swift JSON is so slow and binary isn't necessarily faster.

My exasperation is you were surprised by JSON becoming an issue, when this was the most controversial design decision about the project. To me, it's completely unsurprising.

Re: Xi-Editor Retrospective

#86

Earlier quoted context omitted.

No, where does it go? Are the big editors unsuccessful?

My first test of any text editor is to open something like 4-gigabytes log file with one gigabyte line. If editor works fast, it's good. So far very few editors pass this test, so most are not suitable for general use, only for some niche use like editing tiny text files.

That is a bizarre measure for a text editor.

Re: Xi-Editor Retrospective

#87
post #32

The assertion that gpu is required for good text rendering caught me off guard. I can't claim it is wrong, but it does feel like it should be wrong.

I sure wish it were wrong. If macOS’s text rendering primitives could be used asynchronously or concurrently the situation would be significantly better. I’ve spent probably hundreds of hours trying to make it fast but I’m convinced it’s only possible if you work at Apple (as they have done quite well with Terminal by using lots of hacks that are unavailable to me)

Do you have any leads on the kinds of hacks they do? And does emacs have to do the same hurdles? It looks fine by me. (Mayhap I'm looking at the wrong things?)

Re: Xi-Editor Retrospective

#89
post #85

Earlier quoted context omitted.

Yes. In this discussion and on Reddit, people still talk about binary vs textual as the source of the problem, but I've argued (based on empirical data) that the lexical details are not the reason for the performance problems. Also, Swift is marketed as a fast language (also based on LLVM), yet in my measurements it's 20x to 50x slower than Rust for JSON processing. I found that surprising. Would you not?

I agree with you, it's weird that Swift JSON is so slow and binary isn't necessarily faster. My exasperation is you were surprised by JSON becoming an issue, when this was the most controversial design decision about the project. To me, it's completely unsurprising .

They're saying the reasons were surprising, ie they expected it to be controversial for different reasons

Re: Xi-Editor Retrospective

#90
post #84

Earlier quoted context omitted.

I think the point being made is that it is required for fast text rendering.

Still feels like that should not be the case. What changed so heavily in the last decade? 2d rendering used to be hella fast without the gpu. Right?

Screen resolution / 4k monitors? And maybe font complexity (i.e. lots of web pages seem to be downloading fonts now)
Post reply on HN