Improving Eglot performance

Yesterday I started to rewrite the mataroa-cli tool for the millionth time. This time I chose Rust to do it for three reasons:

  1. I like its type system1, even though I don’t really like the borrow checker
  2. I can statically compile to multiple architectures, nice for a CLI tool
  3. The toolchain is really good, the LSP and Cargo are a blessing

While writing the initial portion of the code, I noticed a mild input lag every time I added a new crate. Weird, I’m not writing a lot of code and it’s not my computer that is lagging. After a few minutes searching for the root cause, I discovered that Eglot prettifies the LSP’s JSON RPC output. You can read more on the GNU Emacs bug report #65760.

The solution is quite simple:

(use-package eglot
  :config
  (advice-add 'jsonrpc--log-event :override #'ignore))

  1. As much as I like Go and its toolchain, I really hate not having Discriminated Unions (called enums in Rust). ↩︎


Articles from blogs I follow around the net

Trimming a Fake Object

A refactoring example. When I introduce the Fake Object testing pattern to people, a common concern is the maintenance burden of it. The point of the pattern is that you write some 'working' code only for test purposes. …

via ploeh blog November 20, 2023

Building a digital vigil for those we've lost

This post is hard to write in a lot of ways. It's more personal than most I've written. This is presumptively a tech blog, and this piece is about so much more than technology. But it's important. Making things, software or otherwise, is ultimatel…

via ntietz.com blog November 19, 2023

#122 Experimenting and Learning

Update on what happened across the GNOME project in the week from November 10 to November 17. GNOME Circle Apps and Libraries Workbench A sandbox to learn and prototype with GNOME technologies. Sonny says Workbench is a code playground and Library to learn, e…

via This Week in GNOME November 17, 2023

Generated by openring