Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def load_target
# If we went through a JIT preload, then we will have attached another JitPreloader elsewhere.
JitPreloader::Preloader.attach(records) if records.any? && !jit_loaded && JitPreloader.globally_enabled?

# If the records were not pre_loaded
# If the records were not preloaded
records.each{ |record| record.jit_n_plus_one_tracking = true }

if !jit_loaded && owner.jit_n_plus_one_tracking
Expand Down
2 changes: 1 addition & 1 deletion lib/jit_preloader/preloader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def jit_preload(associations)
# If you dump a ActiveRecord::Base object that has a jit_preloader instance variable
# you will also end up dumping all of the records the preloader has reference to.
# Imagine getting N objects from a query and dumping each one of those into a cache
# each object would dump N+1 objects which means you'll end up storing O(N^2) memory. Thats no good.
# each object would dump N+1 objects which means you'll end up storing O(N^2) memory. That's no good.
# So instead, we will just nullify the jit_preloader on load
def _dump(level)
""
Expand Down