1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-04-02 13:15:27 +00:00

Using eager loading in GenerateTournamentMatches and AdvanceWrestler, generating/manipulating in-memory, and doing a single bulk insert or update at the end.

This commit is contained in:
2026-02-24 20:58:36 -05:00
parent ca4d5ce0db
commit 18d39c6c8f
18 changed files with 904 additions and 521 deletions

View File

@@ -156,7 +156,7 @@ class Weight < ApplicationRecord
end
def calculate_bracket_size
num_wrestlers = wrestlers.reload.size
num_wrestlers = wrestlers.size
return nil if num_wrestlers <= 0 # Handle invalid input
# Find the smallest power of 2 greater than or equal to num_wrestlers