ML-169.8: reduce Stats mount sync queries to 3

Move 7 non-critical queries out of synchronous mount into assign_async
and start_async tasks with skeleton loading placeholders.

Only scalar badge counters (collection count, wishlist count, scrobble
count) remain synchronous. All async sections use <.async_result> with
loading and failed slots. Scrobble activity preserves LiveView streams
via handle_async. On-this-day date changes use AsyncResult.ok/2.
This commit is contained in:
Claudio Ortolina
2026-05-25 09:31:43 +03:00
parent 6f5c959238
commit f347f56218
6 changed files with 303 additions and 102 deletions
+10
View File
@@ -2591,3 +2591,13 @@ msgstr ""
#, elixir-autogen, elixir-format
msgid "Settings"
msgstr ""
#: lib/music_library_web/live/stats_live/index.ex
#, elixir-autogen, elixir-format
msgid "Could not load records on this day."
msgstr ""
#: lib/music_library_web/live/stats_live/index.ex
#, elixir-autogen, elixir-format
msgid "Loading…"
msgstr ""