Ruby On Rails Application Performance Optimization Tutorial

  • For checking the precise speed of application pages run the application in production mode.
  • check the disable cache from browser console. This will completely disable the Google Chrome cache
  • Database Performance
# app/controllers/users_controller.rb
class UsersController < ApplicationController
def index
@ users = User.includes(:addresses).all
end
...
...
end
## this should produce 2 queries on the same 100 customers.ii) Add index on the N+1 queries:
class AddIndexForUser
def change
add_index :users, :users_id
end
end
## example migration file to add index
  • Replace Http requests with local files
  • Use Pagy for Pagination

--

--

--

Cryptex specializes in developing open source web applications and software solutions across all domains and verticals using Ruby on Rails (ROR) technology

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Source Code Review for Python

Improving your ingestion performance using the multidisciplinary approach

Fabkur.com customer Care number//8617858613//8101439614…Fabkur.com

Chingu Weekly Vol. 22 + Special Announcements

Setting up a Lightsail Static IP Address from Dynamic IP Address.

Amazon Lightsail Part4 by clickaws.com

Choosing a Real Time Metrics Data Store That Works - Botmetric Journey

Kibana proxy for AWS ECS (Fargate) edit

Astonishing Language Translator Using the Mighty Python 3.10

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Cryptex Technologies

Cryptex Technologies

Cryptex specializes in developing open source web applications and software solutions across all domains and verticals using Ruby on Rails (ROR) technology

More from Medium

How to use Active Record in Sinatra (RUBY)

Build a new Ruby on Rails 7.0 Application

Rails 6 — Simple Authentication Tutorial | Rejka Permana

How I Have Created an Eventbrite Clone with Ruby on Rails: Part VI