Logo of AppSignal

Menu

AppSignal Academy

AppSignal is all about building better apps. In our Academy series, we'll explore application stability and performance, and explain core programming concepts.

Caching counters with ActiveRecord's counter caches

By Jeff Kreeftmeijer on

Instead of counting the associated records in the database every time the page loads, ActiveRecord’s counter caching feature allows storing the counter and updating it every time an associated object is created or removed.

read more

Ruby's redo, retry and next keywords

By Thijs Cadier on

We've talked about the retry keyword before. Its little-known counterpart redo works similarly, but reruns loop iterations instead of whole blocks.

read more

Speeding up your app’s navigation with Turbolinks

By Jeff Kreeftmeijer on

Turbolinks is an optimization that increases the perceived performance by being smart about switching pages and reloading assets in your app.

read more

Ensuring execution, retrying failures and reraising exceptions in Ruby

By Jeff Kreeftmeijer on

Besides `rescue`, Ruby has more ways to handle exceptions. We'll use the `retry` and `ensure` keywords and reraised exceptions to build a resilient web API client.

read more

Client-side caching in Rails:
conditional GET requests

By Jeff Kreeftmeijer on

Rails' conditional GET support allows you to store rendered pages in the user's browser cache to reuse them for repeated requests instead of rendering the same view multiple times.

read more

ActiveRecord performance:
the N+1 queries antipattern

By Jeff Kreeftmeijer on

The N+1 queries problem is a common, but usually easy to spot, performance antipattern that's sometimes caused by lazy loading associations.

read more

Rails' built-in cache stores:
an overview

By Jeff Kreeftmeijer on

Rails' cache stores can store the data in memory, Memcached, Redis, or even straight to disk. But which of the different cache stores is best for which situation?

read more

Rescuing exceptions in Ruby

By Jeff Kreeftmeijer on

A raised exception can be rescued to prevent it from crashing your application once it reaches to top of the call stack. In this article, we'll examine different ways to rescue exceptions.

read more

Russian doll caching in Rails

By Jeff Kreeftmeijer on

By nesting cache fragments, views are almost never rendered completely. Even when the data changes, most of the rendered pages are served straight from the cache.

read more

Understanding system load
and load averages

By Jeff Kreeftmeijer on

The load average tells you the load your system has been under. In this article, we'll discuss how it's calculated, how to read the returned values, and when to be alarmed.

read more

Fragment caching in Rails

By Jeff Kreeftmeijer on

Rails' built-in fragment caching is used to store pre-rendered view fragments, so they don't need to be rendered again unless their contents need to change.

read more

Exceptions in Ruby

By Jeff Kreeftmeijer on

An exception is a signal that's sent when the program doesn't know how to deal with a specific situation. In this introduction, we'll explain what exceptions are, and how to raise one, and how to rescue your app from crashes caused by exceptions.

read more

More articles

Go back

Subscribe to

Ruby Magic

Magicians never share their secrets. But we do. Sign up for our Ruby Magic email series and receive deep insights about garbage collection, memory allocation, concurrency and much more.

We'd like to set cookies, read why.