GNOME Bugzilla – Bug 569221
Importing a large directory with only a few new files is slow
Last modified: 2020-03-17 08:19:17 UTC
Importing a directories with only a few new files is very slow on my (admittedly slow) machine. My assumptions: it looks like the directory tree is walked, and for each audio file a database lookup is done. This is slow. I assume this lookup is based on the filename only, so it would be much faster to query the database once using the equivalent of "SELECT DISTINCT filename FROM all_songs", and put those filenames in a list (or hash table with key=filename and value=dummy, or perhaps C# even has a "set" type) for quick lookup. Then, the files with a filename not occurring in this list can be imported as usual. I should note that I haven't looked at the import code. Does this make sense at all?
Oh, I forgot to mention memory is not an issue here. My machine plenty of RAM (just lack of CPU power). Also note that building an temporary in-memory list of all file names does not take that much memory, even for a large library, say, 100 character path times a few thousand songs does not take that much space. Even in UTF-8 encoding this would be far less than 1 MB of RAM. Right?
I too have this problem. I have a folder containing more than 20GB music, and banshee will keep importing for more than half an hour if I choose to import the entire folder -- I can't wait such long and just killed banshee, so I've no ideal how long it will really cost. Other music players like amarok and iTunes are also slow but cost only minuntes.
Same here it takes like an hour to import ~20000 songs, where rhythmbox takes no more than ~7 minutes.
Banshee is not under active development anymore and had its last code changes more than three years ago. Its codebase has been archived. Closing this report as WONTFIX as part of Bugzilla Housekeeping to reflect reality. Please feel free to reopen this ticket (or rather transfer the project to GNOME Gitlab, as GNOME Bugzilla is being shut down) if anyone takes the responsibility for active development again. See https://gitlab.gnome.org/Infrastructure/Infrastructure/issues/264 for more info.