Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

General artist-stats performance #162

Closed
skrollme opened this issue Oct 17, 2022 · 8 comments
Closed

General artist-stats performance #162

skrollme opened this issue Oct 17, 2022 · 8 comments

Comments

@skrollme
Copy link

Since I do not know if it is just my (not that powerful) server and/or docker-setup or a general topic I did not start with a bug-ticket.

I'm very happy with your-spotify and was even more happy, when I got my full export from Spotify and got it imported in your-spotify. But with this large set especially the artist's stats-page takes very long to load.

An example:
I use the search on the top/left and I get the name (and image) of the artists I searched for almost immediately. But when I click the artist it takes around 50sec for the page to finish loading for - in this case - the artist with rank 60 which has around 150 listening-entries.

Other pages, like homepage-stats for last year (with 5721 songs listened) load in about 5sec which I'm totally fine with.

Here a some metrics of the database, which I think can be helpful to compare if it is just my setup or the application in general.

Table Row count
albums 22251
artists 14226
infos 73172
tracks 35814
@skrollme skrollme changed the title General stats-performance General artist-stats performance Oct 17, 2022
@Yooooomi
Copy link
Owner

Yooooomi commented Oct 17, 2022

Hello! Thanks for the feedback. Your device isn't guilty :).
Indeed the artist page is very heavy to load. It is because I compute the rank of the artist. While it does not seem much, I have to compute the rank of every other artist you listened to in order to establish a rank. I can think about a way to make this feature way lighter but it might mean I would have to drop the rank feature.
I'll think about it, thanks for the feedback!

For the record, I have 100 000 infos and my artist page takes 5 seconds to load on a i7 8700h.

@skrollme
Copy link
Author

Ah ok, makes sense. Thank you for the feedback.

Could a possible solution for this be, to queue the artist's rank-calculation to let it run in the background over the day? Or maybe in a nightly cron on a customizable base (daily, weekly, monthly)?

@Yooooomi
Copy link
Owner

Should be fixed in last release.

@skrollme
Copy link
Author

Hello @Yooooomi and thanks for letting me know.
I already updated the app in my docker-setup but - to be honest - I see no difference in loading times. I picked a random artist (150 listens) page which took around 40seconds (/artist/*/stats). Immediately after the page has loaded, the rank (which was 68 for this artist) was loaded asynchronously. This /artist/*/rank call took 6sec.
I will later check how the server-performance (cpu, ..) behaves during the loading

@Yooooomi
Copy link
Owner

Mmh, sad news. Since artist stats cannot be customized with time, I should compute them on backend and only fetch the result from the front end. This logic is new in the Spotify backend. I'll try to implement something like this in the next release. The main point is I don't want to compute artist stats for artists you'll never see.
I'll think about it. Sorry for the hope.

@skrollme
Copy link
Author

No problem, and no need to say sorry 😄 I'm very grateful for the great tool you created and happy that you continue working on it 👍

@Yooooomi Yooooomi reopened this Jan 21, 2023
@jamess60
Copy link

jamess60 commented May 31, 2023

Tip - Updating to a newer mongo version (5 or higher) massively increased performance for me, but you will likely need an amd64 arch cpu with avx

@quentinguidee
Copy link
Contributor

Fixed by #348, #354 and #355 (release 1.8.0)

@Yooooomi Yooooomi closed this as completed Mar 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants