ruby-on-rails
ruby-on-rails
performance
Rails Performance Optimisation - Understanding GVL in practice
Rails performance starts with understanding the GVL: why only one thread runs Ruby code at a time, how that throttles CPU-bound apps, throughput vs latency, choosing a server, offloading to background jobs, and how to instrument and measure before optimising.
postgres
How can I check the size of the database and tables in PostgreSQL?
PostgreSQL database size checks in a few simple SQL queries: list all databases with pg_database and pg_size_pretty, then break down the biggest tables in a schema, indexes included. Spot what eats disk space before it slows backups and raises infrastructure costs.
Latest
How to track and log slow queries in Ruby on Rails applications?
Slow SQL queries in Rails can be caught in development, before they become production fires. Using ActiveSupport::Notifications and the sql.active_record event, you build a small performance guard that logs every query above a time threshold straight to your console.
How can large files be sent efficiently in Ruby on Rails with authentication and caching?
Sending large files through Rails wastes memory and blocks app workers. X-Sendfile hands the transfer to NGINX while Rails keeps authentication and caching: server configuration, cache headers, testing in development, other HTTP servers, and a complete example.
PostgreSQL indexing for newbies - Practical Guide
PostgreSQL indexing explained for beginners: how B-tree, BRIN, GIST, and GIN indexes work, reading EXPLAIN ANALYZE to see if they are used, maintenance and hit rate tips, and clear rules for when an index helps and when it just slows your writes down.
OJ is not as safe as you think for your JSON
OJ speeds up JSON in Ruby, but Oj.mimic_JSON silently drops the script_safe option, opening the door to XSS, and adds time precision quirks. What its monkey patching really changes, the stability risks, and best practices for using OJ without surprises.
React Code splitting using lazy load techniques
React code splitting with React.lazy and Suspense: break a growing bundle into chunks users download only when needed, with a walkthrough of lazy imports, fallback UI, and why smaller initial loads help user experience and SEO.
Painting 'Lady with a weasel' using genetic algorithms and Ractor parallelism in Ruby
Genetic algorithms meet Ruby Ractors: a script that repaints Lady with a Weasel generation by generation. Follow the full lifecycle (mutation, fitness scoring, crossover), see how Ractor parallelism speeds up scoring specimens, and view the final result.
Finding the slowest tests in Minitest and Rspec using profiler
Slow test suites usually hide a few expensive tests. Minitest and RSpec both ship a built-in profiler: bin/rails test --profile and rspec --profile 10 list your slowest examples with execution times, so you know exactly which tests to optimize first.