Skip to content
This repository has been archived by the owner on Feb 25, 2022. It is now read-only.

barsoom/reproduce_observer_error

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Reproducing an issue with rails-observers when you observe ActiveRecord::Base (or possibly any base class with many subclasses?), and there are many subclasses. It seems to take expontentially longer to eager_load the app the more models there are.

bundle
time rails r 'Rails.application.eager_load!'

With 75 models.

real    0m14.407s
user    0m13.684s
sys     0m0.656s

With 100 models.

real    0m38.096s
user    0m33.700s
sys     0m1.132s