RubyFlow The Ruby and Rails community linklog

×

The Ruby and Rails community linklog

Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!

N+1 Control: prevent the N+1 queries problem

NPlusOneControl (https://github.com/palkan/n_plus_one_control) is a new tool to prevent N+1 problems.

Unlike other libraries, n_plus_one_control is not a feature testing tool (i.e. you don’t have to specify exact expectations) but a performance testing tool – you test the performance of the code under consideration.

NPlusOneControl evaluates the code several times with different scale factors to make sure that the number of DB queries behaves as expected – O(1) instead of O(N).

That’s the way we make sure that no N+1 problem appears in our code.

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in