Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

N+1 #143

Open
Dandush03 opened this issue Jul 30, 2024 · 2 comments
Open

N+1 #143

Dandush03 opened this issue Jul 30, 2024 · 2 comments

Comments

@Dandush03
Copy link

Must views have N+1 issues, I recomend using Bullet to find the out.

@rosa
Copy link
Member

rosa commented Jul 30, 2024

Hey @Dandush03, thanks for reporting! I'm aware of that, since Mission Control was designed to work with multiple adapters that are totally different (Resque vs. Solid Queue right now), it's not as straightforward to address these. If you'd like to contribute a PR with some fixes, they'd be very welcome.

@searls
Copy link

searls commented Aug 16, 2024

In the meantime, I have disabled my controller-level N+1 detector (prosopite) so it doesn't warn/error when I'm at mission control:

Example of how using controller_path on a hook condition:

# app/controllers/application_controller.rb
if Rails.env.development?
  Prosopite.rails_logger = true
  around_action :n_plus_one_detection, unless: -> { controller_path.starts_with?("mission_control") }

  def n_plus_one_detection
    Prosopite.scan
    yield
  ensure
    Prosopite.finish
  end
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants