Commit graph

25 commits

Author SHA1 Message Date
89440daf7b feat: improve listens report response time
Reduce response time for larger intervals (e.g. all time) from 9 seconds
to 150ms in my tests.
2023-09-16 23:20:15 +02:00
38cf2ff549
chore(deps): bump all (#294) 2023-09-16 13:02:19 +02:00
471f46eb8d fix(api): album&track reports only contain one artist
Albums & Tracks can have multiple artists associated with them, but
the previous SQL queries would only return a randomly-chosen one of them.
2023-03-17 17:37:14 +01:00
d6af6f9cba fix(api): missing OpenAPI route tags 2022-07-12 20:34:14 +02:00
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
a0ffe108e1 feat(api): update existing artists in MusicLibrary 2021-11-21 15:53:49 +01:00
a0c28e2324 feat: top genres report 2021-11-21 15:53:49 +01:00
e476243b85 test: create initial unit tests 2021-07-18 21:57:38 +02:00
9b96d0fab4 chore(lint): switch to eslint 2021-05-25 18:12:42 +02:00
f56548e432 chore: run prettier format 2021-05-25 16:02:00 +02:00
51fd78f6d9 feat: add top tracks report 2021-05-22 15:10:05 +02:00
9896ea31ff feat: introduce new report "Top Albums" 2020-11-15 02:43:23 +01:00
427964f255 refactor(api): remove unused constant 2020-11-15 02:36:44 +01:00
44f7e26270 feat: implement long-lived sessions 2020-11-09 18:34:23 +01:00
5fb8a99a56 refactor: fix import relative paths 2020-09-05 21:07:05 +02:00
fb9b83d440 fix(server): improve listens report response time
Do not unnecessarily join too many relations
2020-07-12 17:53:31 +02:00
67ea28aec7 refactor: use TimeOptions for Listens report 2020-07-12 17:53:31 +02:00
5bc76f23d0 refator: use TimeOptions for TopArtists report 2020-07-12 17:53:31 +02:00
ad0d197105 refactor(server): do not export listen repository to outside modules 2020-07-12 17:53:31 +02:00
11af91cadb refactor(server): introduce scoped query builders for recurring filters 2020-07-12 17:53:31 +02:00
aecc82576a fix: improve top-artists response time
By calculating the necessary counts in the database, we avoid
unncessary joins and data transmissions.
2020-07-11 19:35:36 +02:00
6fc10c40ca feat: add top-artists report 2020-07-04 21:56:27 +02:00
b8918889a1 refactor(server): introduce TimePresets for reports 2020-06-01 21:19:50 +02:00
6f8fc0265a fix(server): validate listens report query params
When using Omit<>, class-validator can not see the decorators of the base
type and skips validation.
2020-06-01 21:19:50 +02:00
3828b841c2 feat(api): add listen report endpoint 2020-05-09 19:24:17 +02:00