Listory/src/reports
Julian Tölle 99a4593774 fix(api): improve performance of all time listens report
The current algorithm is CPU intensive and blocks the event loop for
multiple seconds in my deployment. This is not acceptable, as other
requests can not be answered during that time.

I do not have time to fully fix the issue here, but I did implement an
optimization for ALL_TIME reports:

Before, the all time report was generated for every timeFrame since 1970,
which iterated over the listens many hundred times. We can instead only start
the interval at the day of the first listen, and therefore skip 50+ years
of calculations.
2022-06-19 20:35:30 +02:00
..
dto feat: top genres report 2021-11-21 15:53:49 +01:00
interval.d.ts refactor(server): introduce TimePresets for reports 2020-06-01 21:19:50 +02:00
reports.controller.spec.ts test: create initial unit tests 2021-07-18 21:57:38 +02:00
reports.controller.ts feat: top genres report 2021-11-21 15:53:49 +01:00
reports.module.ts refactor: fix import relative paths 2020-09-05 21:07:05 +02:00
reports.service.spec.ts test: create initial unit tests 2021-07-18 21:57:38 +02:00
reports.service.ts fix(api): improve performance of all time listens report 2022-06-19 20:35:30 +02:00
timeframe.enum.ts feat(api): add listen report endpoint 2020-05-09 19:24:17 +02:00
timePreset.enum.ts refactor(server): introduce TimePresets for reports 2020-06-01 21:19:50 +02:00