Skip to content

Commit

Permalink
Adding note about efficiency to monthly_tables_with_name_func
Browse files Browse the repository at this point in the history
  • Loading branch information
mtlynch committed Dec 8, 2015
1 parent 058d8eb commit 125ca84
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bigsanity/table_names.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ def _monthly_tables_with_name_func(time_range_start, time_range_end,
# very close to the month border.
current_time = max(MIN_TABLE_MONTH, time_range_start - day_delta)
time_limit = min(MAX_TABLE_MONTH, time_range_end + day_delta)
# Keep incrementing current_time by 1 day until we reach the end of the
# range. This is not optimal for efficiency, but it is simple.
while current_time < time_limit:
table_name = table_name_func(current_time)
tables.add(table_name)
Expand Down

0 comments on commit 125ca84

Please sign in to comment.