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

Resonance 0.1.2 flatpak takes too much time to open after music library build and consume a huge amount of ram #32

Open
Alexios13 opened this issue Apr 8, 2023 · 21 comments
Labels
performance Peformance issues, ie efficiency, speed, memory usage etc

Comments

@Alexios13
Copy link

Alexios13 commented Apr 8, 2023

The application takes too long to open as for some reason it consumes too much ram. In my case resonance was using more and more ram until it reached 10.6Gb and then it opened. The version of the application is 0.1.2 flatpak, OS: Nobara 37, intel i7 8750h, 16gb ram. I don't know what other information I might need to provide or how to find this information but let me know if you want more.

Στιγμιότυπο οθόνης από 2023-04-08 16-59-53

@nate-xyz
Copy link
Owner

nate-xyz commented Apr 8, 2023

Is this abnormally large usage of memory only on startup? Is also too high during the import process? Is it normal during regular usage of the application after import? How large is your music library?

@Arcitec
Copy link

Arcitec commented Apr 8, 2023

How large is your library?

My library is only 20 tracks. It uses 64.2 MB RAM for me..

@nate-xyz nate-xyz added the performance Peformance issues, ie efficiency, speed, memory usage etc label Apr 8, 2023
@Alexios13
Copy link
Author

Alexios13 commented Apr 8, 2023

My library has 14104 files with a total size of 54.8Gb. This large consumption happens every time I open the application. After it opens, the consumption drops to about 9Gb of ram. When I opened the app for the first time I didn't notice how much ram it consumed but it had crashed once and on the second try it loaded my library and opened. The lollypop app consumes about 400mb for the same library.

@nate-xyz
Copy link
Owner

nate-xyz commented Apr 8, 2023

This is just speculation without looking into it yet but this could possibly be related to gdk pixbuf memory usage, if you have a large library and your embedded tag art is super high in resolution I could see that using a huge amount of memory. If it is that, I could set a limit on image size when importing so images stored in the database are compressed.

@Alexios13
Copy link
Author

It is true that my library is large and the embedded tag art is super high in resolution. Is it possible that it doesn't load on startup but when you choose to view the page of an artist or album?

@nate-xyz
Copy link
Owner

nate-xyz commented Apr 8, 2023

Could you use sqlitebrowser or some similar application to look at the database? The db file should be in (your home folder) / .var/app/io.github.nate_xyz.Resonance/data/io.github.nate_xyz.Resonance/.

Once you open the file, take a look at the Cover_Art table. If you're using sqlitebrowser you should be able to see the image size on the right panel.

@nate-xyz
Copy link
Owner

nate-xyz commented Apr 8, 2023

Is it possible that it doesn't load on startup but when you choose to view the page of an artist or album?

Are you suggesting that it shouldn't load on startup or asking whether it does or not? Right now the application loads all images into memory at startup, which is definitely not optimal in your case. I could definitely implement lazy loading for images + maybe compressing super high resolution image art.

@Alexios13
Copy link
Author

Is it possible that it doesn't load on startup but when you choose to view the page of an artist or album?

Are you suggesting that it shouldn't load on startup or asking whether it does or not? Right now the application loads all images into memory at startup, which is definitely not optimal in your case. I could definitely implement lazy loading for images + maybe compressing super high resolution image art.

Yes, that's what I'm describing.

Could you use sqlitebrowser or some similar application to look at the database? The db file should be in (your home folder) / .var/app/io.github.nate_xyz.Resonance/data/io.github.nate_xyz.Resonance/.

Once you open the file, take a look at the Cover_Art table. If you're using sqlitebrowser you should be able to see the image size on the right panel.

I installed sqlitebrowser and found the Cover_Art table but I don't understand what I should see and report as there is no right panel.

@nate-xyz
Copy link
Owner

nate-xyz commented Apr 8, 2023

I installed sqlitebrowser and found the Cover_Art table but I don't understand what I should see and report as there is no right panel.

My fault I should've been more specific, you have to:

  1. right click the Cover_Art table and click "Browse Table"
  2. click on the BLOB values in the data column to see the image preview

@Alexios13
Copy link
Author

Ok I did it. Most images are 1200x1200 pixels

@nate-xyz
Copy link
Owner

nate-xyz commented Apr 8, 2023

Ok cool thanks, what was the general file size if u don't mind?

@Alexios13
Copy link
Author

Sorry I should have mentioned it. About 300kib per image on average.

@nate-xyz
Copy link
Owner

nate-xyz commented Apr 8, 2023

Weird, that's not too crazy, a lot of mine are that size or bigger. How many rows are in the Cover_Art table?

@Alexios13
Copy link
Author

Alexios13 commented Apr 8, 2023

How many rows are in the Cover_Art table?

1254 rows
Στιγμιότυπο οθόνης από 2023-04-08 19-32-05

@nate-xyz
Copy link
Owner

nate-xyz commented Apr 8, 2023

Are there any duplicates?

@Alexios13
Copy link
Author

No, it's all different.

@nate-xyz
Copy link
Owner

nate-xyz commented Apr 8, 2023

Ok, unless something else is a huge memory hog this is probably the culprit, and I'll need to implement lazy loading every pixbuf

@SoiledBrush
Copy link

I also have same problem
Screenshot from 2023-04-08 23-00-30
nearly 10k song taking 250gb.

@random-name01
Copy link

For me it even crashes when indexing my music folder (>14.000 songs with embedded artwork). I’m assuming this is the same underlying issue, hence why I didn’t open a new thread.

@legacychimera247
Copy link

legacychimera247 commented Apr 13, 2023

having a quick test, i have about 3.7 gb for a 300 gb music folder, same folder has like 260 mb with tauon music box, so improvements are very much welcome :P :)

edit: had to reimport the music folder today, now it loaded all (more or less) of the artists images and it's up to 4.2 gb...

@AshtakaOOf
Copy link

I have 1800 tracks and I'm having the same issue as Alexios13, same behavior and same ram usage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Peformance issues, ie efficiency, speed, memory usage etc
Projects
None yet
Development

No branches or pull requests

7 participants