Articles tagged as “performance”

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

From time to time I like to optimize a bit my Windows machine, yet mostly all I do is fine tunning, nothing really spectacular. This time while I was browsing the net and thinking about one of my old nags (browser performance loading several tabs, to more exact: Firefox loading up 20+ tabs) I realized something really ...

On Ruby 2.0 memory usage, Unicorn and Heroku

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 ...

Improve Rails performance by adding a few gems

Working with Rails for some time you start nitpicking on how to improve it. This is a first in the series of articles regarding on how to improve (even marginally) Rails's performance. I'll focus on a bunch of gems that speed up, in some cases considerably, small parts of Rails, like the html escaping, the String#blank? ...

How to reduce the size of your VMs

As the host OS I use Windows 8 (just upgraded to 8.1), well why ? one might ask.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 enough ...

Is Rubinius 2.2.3 production ready ?

Ruby 2.1 was released this Christmas, great news everyone! It sports a better GC (RGenGC - gerational GC), hierarchical method caching, some small syntax changes and non-experimental rafinements. All in all one can expect 5% to 15% performance increase which is quite awesome. As I was reading the comments in the hacker ...

Chunked transfer encoding in Rails (streaming)

Anyone that 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. Is rather simple: in a normal request where the server responds ...

Ruby 2.2.0 Preview 1 quick Rails benchmarks

Great news everyone! Ruby 2.2 preview 1 has been released ! I'm really curios about the Incremental GC and Symbol GC so let's run some quick Rails benchmarks on a normal Rails API app. First off let's install the preview via RVM: rvm install ruby-2.2.0-preview1 After fiddling around about five minutes trying to find a ...

Making Rails asset pipeline faster

We all know that for a rather large Rails app where the front-end is quite stuffed, the asset pre-compilation and more importantly - development mode changes are far from instantaneous. The front-end we're referring to is the kind that makes heavy use of sass, sass libraries (Compass, Bourbon, etc.) and transpiled ...

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

I'm not sure why RVM is still my default Ruby version manager yet the issue at hand should be reproducible on rbenv too. Let's add a bit of context to this: we have an API written in Ruby and running on JRuby i.e. via JVM which implies slow start-up times compared to CRuby (yes, even with export JRUBY_OPTS='--dev'). I ...

Moving from iTerm2 to Kitty for simplicity and performance

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 ...

Kamal, Rails deployments, and Rega turntables

Lately I've started to put back into a working state my turntable. 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 ...

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

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 ...