Prosopite

screenshot of Prosopite
rails

Rails N+1 queries auto-detection with zero false positives / false negatives

Overview

Prosopite is an innovative gem designed to help developers efficiently manage N+1 queries in their Rails applications. This powerful tool automatically detects N+1 queries without generating any false positives or negatives, a common issue faced by users of previous solutions like the Bullet gem. With Prosopite, teams can streamline their testing processes and improve application performance by identifying and addressing these troublesome queries quickly and accurately.

The need for a new gem arose from the limitations of existing solutions, and Prosopite's architecture effectively addresses these concerns by monitoring SQL queries using Active Support instrumentation. Its unique approach allows it to detect a broader range of N+1 query scenarios, ensuring that developers have a reliable tool at their disposal to pinpoint and rectify performance issues.

Features

  • Accurate Detection: Automatically detects N+1 queries in Rails applications with zero false positives or negatives.

  • Broad Coverage: Identifies additional N+1 query scenarios not addressed by other gems, such as queries after record creations.

  • Customizable Notifications: Configuration options allow you to control how and where notifications are raised, including logging to Rails or custom logs.

  • User-Friendly Configuration: Simple setup by adding a line to your application's Gemfile, making integration into existing projects straightforward.

  • Development Environment Support: Offers features to enable auto-detection across all controllers, enhancing development workflows.

  • Middleware Options: Provides Rack middleware support for adding auto-detection functionality across multiple controllers easily.

  • Sidekiq Integration: Includes middleware specifically for Sidekiq, enabling the detection of N+1 queries in background jobs seamlessly.

  • Flexible Management: The gem can be easily enabled or disabled, and developers can customize the logging behavior to suit their needs.

rails
Ruby on Rails

Ruby on Rails, often referred to as Rails, is an open-source web application framework written in Ruby. Known for its convention over configuration and don't repeat yourself (DRY) principles, Rails simplifies and accelerates the development of database-backed web applications.