Burndown charts still load events synchronously
In !10328 (merged), we made burndown charts load the event data asynchronously.
But as noted in #7302 (comment 233410799), we still load all events on page load because we call Burndown#empty?
and Burndown#legacy_data?
which needs all events to be queried and grouped.
For #legacy_data?
, I think we need to change the call to #select
and #any?
here so that we don't need to load all the records in memory.
For #empty?
, we need to also change burndown_events.any?
into a DB lookup if possible. Or we could just check the results of the async request instead of doing this here.