Topic

performance

Articles tagged as “performance”.

Semantic search in Rails using sqlite-vec, Kamal and Docker

Published

I’ve been reading a lot about search lately: kNN, BM25, RRF and related ideas, both within Elasticsearch and in isolation. With the advent of LLMs, especially open-weight models, plus modern hardware, it feels like a good time to approach some of this in a pragmatic way. On the blog I'm already using a form of BM25 via …

Kamal, Rails deployments, and Rega turntables

Published

Lately I've started to put my turntable back into working order. It's been disconnected from my main audio chain for about five years. The TT is a Rega RP3 with a bog-standard Rega Carbon cartridge. Why now one might ask? It wasn't my top priority and streaming Spotify to the WiiM Mini then via a DAC directly into my NAD …

Moving from iTerm2 to Kitty for simplicity and performance

Published

I love iTerm2, but it can be sluggish sometimes on my old late 2016 MacBook Pro. Plus, many of its features I never use. I had tried Alacritty before, but making it look and act like iTerm2 was a no-go. This time, I tried Kitty, and within two hours of work, it looked and behaved just like my iTerm2 configuration. This …

JRuby, RVM and Vim walk into a (performance) bar

Published

I'm not sure why RVM is still my default Ruby version manager, but the issue at hand should be reproducible on rbenv too. Historical note: this article reflects a Vim 8.0, JRuby, RVM, and macOS system Ruby setup from 2017; versions and defaults differ on current macOS systems. Let's add a bit of context to this: we have …

Making Rails asset pipeline faster

Published

This article reflects the 2016-era Rails asset pipeline—Ruby Sass, libsass, Compass, therubyracer, and Node.js 6—and is not current Rails asset guidance. We all know that for a rather large Rails app with a substantial front end, the asset pre-compilation and more importantly - development mode changes are far from …

Ruby 2.2.0 Preview 1 quick Rails benchmarks

Published

Great news everyone! Ruby 2.2 preview 1 has been released ! I'm really curious about the Incremental GC and Symbol GC so let's run some quick Rails benchmarks on a normal Rails API app. Archive note (2014): Ruby 2.2.0-preview1 was prerelease software and must not be used now. Ruby 2.2 reached end of life on 31 March 2018; …

Improve Rails performance by adding a few gems

Published

After working with Rails for some time, you start nitpicking about how to improve it. This is the first in a series of articles on how to improve (even marginally) Rails's performance. Archive note (2014): This is Rails 4.1-era advice. Do not copy these dependencies, native extensions, or global monkey patches into a …

Is Rubinius 2.2.3 production ready ?

Published

Ruby 2.1 was released this Christmas, great news everyone! It sports a better GC (RGenGC — generational GC), hierarchical method caching, some small syntax changes and non-experimental refinements. All in all one can expect 5% to 15% performance increase which is quite awesome. Archive note (2014): Rubinius 2.2.3, JRuby …

How to reduce the size of your VMs

Published

As the host OS I use Windows 8 (just upgraded to 8.1), Well, why, one might ask? It is rather simple: Steam and after some dreadful searching and configuring tools I managed to install the basics for writing and deploying code: Vim, Git, PuTTy and a decent console replacement like Console2 [0]. Of course those aren't …

Chunked transfer encoding in Rails (streaming)

Published

Anyone who has written a little PHP knows what the flush() family of functions do. The ideal usage scenario for using chunked transfer[0] is when we have something costly to render e.g. the first three most recent articles on a blog. Why, one might ask? Why stream It is rather simple: in a normal Rails render, the server …

On Ruby 2.0 memory usage, Unicorn and Heroku

Published

On UNIX-like operating systems (e.g. Linux) there's the concept of process forking via the fork() system call. When one calls fork from a parent-process it will spawn a new child-process - that is a copy of its parent, then both processes return from fork. The child-process has an exact copy of the parent's memory in a …

How I speeded up my browsing experience by a really nice margin

Published

Historical Windows/Firefox optimization (2010)—do not move a current browser profile using these instructions. RAM disks are volatile, so data disappears on shutdown or a crash. Moving the wrong profile path can lose history, sessions, cookies, or other user data. Back up the profile and treat this only as a dated account …