fill_messages_by_date, fill_messages_by_time_of_day , and fill_messages_by_day_of_week inside message_by_date_processor.rb. Each method sorts the array twice while trying to insert 0 values for dates without data points. This can be alternatively be done in-place. Each method serves a very similar purpose, and may be able to be combined into one.
fill_messages_by_date
,fill_messages_by_time_of_day
, andfill_messages_by_day_of_week
insidemessage_by_date_processor.rb
. Each method sorts the array twice while trying to insert 0 values for dates without data points. This can be alternatively be done in-place. Each method serves a very similar purpose, and may be able to be combined into one.