Note that Mongoid 8 has improved this over Mongoid 7, but there may be an opportunity to further improve.
# To test behaviour with autosaving too much # Results at the bottom, v6, v7, v8 all save too much though v7 is by far the worst # & is what prompted me to patch this in the first place $save_ctr = Hash.new {|h,k| h[k] = 0} class Table include Mongoid::Document include Mongoid::Timestamps::Updated has_many :rows, autosave: true after_save { $save_ctr[self.class] += 1 } end class Row include Mongoid::Document belongs_to :table has_many :cells, autosave: true after_save { $save_ctr[self.class] += 1 } end class Cell include Mongoid::Document belongs_to :row after_save { $save_ctr[self.class] += 1 } end table = Table.new 10.times do row = table.rows.build 10.times do row.cells.build end end table.save! # Reset counter $save_ctr = Hash.new {|h,k| h[k] = 0} table = Table.find(table.id) new_row = table.rows.build new_row.cells.build table.save # Patched v7-support: 1 table, 1 row, 1 cell # # v6.4.8 - 1 table, 2 row, 1 cell # v7.5.4 - 1 table, 11 row, 101 cell # v8.1.5 - 1 table, 11 row, 1 cell pp $save_ctr