Common Advice for Performance issues experienced with Banshee

Examples of good performance bug reports

User interface related:

* Scrolling through the artist browser using the keyboard felt slow https://bugzilla.gnome.org/show_bug.cgi?id=635565

* The album and new Banshee 2.0 podcast grid feels slow https://bugzilla.gnome.org/show_bug.cgi?id=613723

Feature Specific:

* Library Watcher causing a performance and resource consumption issue https://bugzilla.gnome.org/show_bug.cgi?id=617687

* Slow doing one specific task https://bugzilla.gnome.org/show_bug.cgi?id=622826

Database performance issues

Ensuring that you are using a known working version of SQLite

https://launchpad.net/~banshee-platform-regression-team (the correct route?)

Find regressions, document where users can go on Launchpad to a fixed regression report to mark themselves as affected.

(Very Ubuntu specific currently but we are good friends with the Ubuntu guys and the feedback benefits everyone.)

Ruling out an inefficient database

In a terminal run:

sqlite3 ~/.config/banshee-1/banshee.db "vacuum; analyze;"

(this may take a couple of minutes and is perfectly safe) (this also may require you to install additional software, if you run Ubuntu you should be informed on how to install this if it is not present)

Then confirm that the issue is still present.

If not no bugreport is needed, Banshee will perform maintance optimizations as your library changes and these problems will go away automatically. If you suffer greatly simply perform the optimization suggest above.

If however this kind of maintance is required frequently (e.g. every day) though please file a bug so it can be investigated.

Determining if Banshee is vastly slower than SQLite itself

Banshee in debug mode will trigger a warning if any query takes more than 500ms.

example of output seen in though suggested level is WARN not DEBUG. (FIXME: only example I have handy is from: https://bugzilla.gnome.org/show_bug.cgi?id=622826)

[2 Debug 22:20:35.066] Executed in 12241ms SELECT CoreTracks.Rating,CoreTracks.LastStreamError,CoreTracks.TrackID,CoreTracks.PrimarySourceID,CoreTracks.ArtistID,CoreTracks.AlbumID,CoreTracks.TagSetID,CoreTracks.MusicBrainzID,CoreTracks.MimeType,CoreTracks.FileSize,CoreTracks.FileModifiedStamp,CoreTracks.LastSyncedStamp,CoreTracks.Attributes,CoreTracks.Title,CoreTracks.TitleSort,CoreTracks.TrackNumber,CoreTracks.TrackCount,CoreTracks.Disc,CoreTracks.DiscCount,CoreTracks.Duration,CoreTracks.Year,CoreTracks.Genre,CoreTracks.Composer,CoreTracks.Conductor,CoreTracks.Grouping,CoreTracks.Copyright,CoreTracks.LicenseUri,CoreTracks.Comment,CoreTracks.BPM,CoreTracks.BitRate,CoreTracks.SampleRate,CoreTracks.BitsPerSample,CoreTracks.Score,CoreTracks.PlayCount,CoreTracks.SkipCount,CoreTracks.ExternalID,CoreTracks.LastPlayedStamp,CoreTracks.LastSkippedStamp,CoreTracks.DateAddedStamp,CoreTracks.DateUpdatedStamp,CoreTracks.Uri,CoreArtists.Name,CoreArtists.NameSort,CoreAlbums.Title,CoreAlbums.TitleSort,CoreAlbums.ArtistName,CoreAlbums.ArtistNameSort,CoreAlbums.IsCompilation,CoreAlbums.MusicBrainzID,CoreArtists.MusicBrainzID FROM CoreTracks,CoreArtists,CoreAlbums WHERE CoreArtists.ArtistID = CoreTracks.ArtistID AND CoreAlbums.AlbumID = CoreTracks.AlbumID AND CoreTracks.Uri = 'file:///home/david/Musik/Thomas%20Paine/The%20Age%20of%20Reason/21%20-%20Part%20Second,%20Section%206.mp3' LIMIT 1

Then you run something like this: david@sagan:~$ time sqlite3 ~/.config/banshee-1/banshee.db "SELECT CoreTracks.Rating,CoreTracks.LastStreamError,CoreTracks.TrackID,CoreTracks.PrimarySourceID,CoreTracks.ArtistID,CoreTracks.AlbumID,CoreTracks.TagSetID,CoreTracks.MusicBrainzID,CoreTracks.MimeType,CoreTracks.FileSize,CoreTracks.FileModifiedStamp,CoreTracks.LastSyncedStamp,CoreTracks.Attributes,CoreTracks.Title,CoreTracks.TitleSort,CoreTracks.TrackNumber,CoreTracks.TrackCount,CoreTracks.Disc,CoreTracks.DiscCount,CoreTracks.Duration,CoreTracks.Year,CoreTracks.Genre,CoreTracks.Composer,CoreTracks.Conductor,CoreTracks.Grouping,CoreTracks.Copyright,CoreTracks.LicenseUri,CoreTracks.Comment,CoreTracks.BPM,CoreTracks.BitRate,CoreTracks.SampleRate,CoreTracks.BitsPerSample,CoreTracks.Score,CoreTracks.PlayCount,CoreTracks.SkipCount,CoreTracks.ExternalID,CoreTracks.LastPlayedStamp,CoreTracks.LastSkippedStamp,CoreTracks.DateAddedStamp,CoreTracks.DateUpdatedStamp,CoreTracks.Uri,CoreArtists.Name,CoreArtists.NameSort,CoreAlbums.Title,CoreAlbums.TitleSort,CoreAlbums.ArtistName,CoreAlbums.ArtistNameSort,CoreAlbums.IsCompilation,CoreAlbums.MusicBrainzID,CoreArtists.MusicBrainzID FROM CoreTracks,CoreArtists,CoreAlbums WHERE CoreArtists.ArtistID = CoreTracks.ArtistID AND CoreAlbums.AlbumID = CoreTracks.AlbumID AND CoreTracks.Uri = 'file:///home/david/Musik/Thomas%20Paine/The%20Age%20of%20Reason/21%20-%20Part%20Second,%20Section%206.mp3' LIMIT 1"

Expected output should look something like:

real 0m30.323s

user 0m13.440s

sys 0m1.200s

Now compare the "user" output with Executed in XXXms output from Banshee

If Banshee is significantly slower than the real time measurement, especially if the test is repeated multiple times. Then please file a bug and attach all the output from your investigation (e.g. as seen in the example above) as well as both debug and database debug logs.

If the times are roughly equal please also file a bug titled [SQLite] Investigate query (Executed in "output from same"ms, real "real output") and we will investigate. Perhaps we are using SQLite suboptimally or simply wrong. Another possibility could be that this is a performance regression in SQLite.

Please subscribe to https://launchpad.net/~banshee-platform-regression-team (the correct route?) and you will be notified via email when any SQLite packages are going out which you are requested to retest against.

Getting and validating your database layout

sqlite3 ~/.config/banshee-1/banshee.db ".schema CoreTracks"

Users of Banshee 1.9.1 and above can use banshee-1 --validate-db-schema to validate that their database contains all the same layout as a new database.

Attic/Banshee/CommonQuestions/PerformanceIssues (last edited 2018-01-02 21:55:38 by SvitozarCherepii)