Is there a Grails plugin for detecting N+1 fetching (similar to the Rails bullet gem)?

147 views Asked by At

I recently learned about the Rails "bullet" gem that addresses the N+1 problem and determines when your app should or should not use eager fetching. Apparently it checks at runtime on the occurrence of N+1 loads that are not needed or the need for eager fetching to speed things up in instances where lazy fetching is being used.

https://github.com/flyerhzm/bullet

Is there an equivalent plugin for Grails?

1

There are 1 answers

0
Joshua Moore On

The short answer is, no. There isn't a plugin for Grails, at this time, that does this. You will need to manage the fetch mode manually through your code.

I recommend you develop your application first, then profile it to identify where a change to any fetch modes would be appropriate.

Remember the rule of "measure twice, cut once.".