summaryrefslogtreecommitdiff
path: root/nonprism
diff options
context:
space:
mode:
Diffstat (limited to 'nonprism')
-rw-r--r--nonprism/banshee/PKGBUILD17
-rw-r--r--nonprism/banshee/sqlite_fix.patch146
2 files changed, 156 insertions, 7 deletions
diff --git a/nonprism/banshee/PKGBUILD b/nonprism/banshee/PKGBUILD
index 386ca0052..249e4cbcb 100644
--- a/nonprism/banshee/PKGBUILD
+++ b/nonprism/banshee/PKGBUILD
@@ -5,7 +5,7 @@
pkgname=banshee
pkgver=2.6.2
-pkgrel=5.nonprism1
+pkgrel=6.nonprism1
pkgdesc="Music management and playback for GNOME, without gdata-sharp support"
arch=('i686' 'x86_64' 'mips64el')
url="http://banshee.fm/"
@@ -22,7 +22,14 @@ source=(http://download.gnome.org/sources/$pkgname/2.6/$pkgname-$pkgver.tar.xz
Initial-port-to-GStreamer-1.0.patch
Remove-build-time-enable-gapless-playback-option.patch
Don-t-use-the-new-decoded-pad-signal-of-decodebin.patch
- Use-new-style-GStreamer-1.0-raw-audio-caps-in-the-WA.patch)
+ Use-new-style-GStreamer-1.0-raw-audio-caps-in-the-WA.patch
+ sqlite_fix.patch)
+md5sums=('12dbb8a996783f7081d538062a8589b7'
+ '16cbe2ef60e6f9b22015585bb3209648'
+ '0bf7ee4241b12538779c9ecc401d142a'
+ 'f87534f54029794bd7be2a123ab01300'
+ 'd092827720e4a11549587eb3131123ae'
+ '72ca131b950d58998fd9286fad722ed7')
prepare() {
cd $pkgname-$pkgver
@@ -30,6 +37,7 @@ prepare() {
patch -p1 -i ../Remove-build-time-enable-gapless-playback-option.patch
patch -p1 -i ../Don-t-use-the-new-decoded-pad-signal-of-decodebin.patch
patch -p1 -i ../Use-new-style-GStreamer-1.0-raw-audio-caps-in-the-WA.patch
+ patch -p1 -i ../sqlite_fix.patch
}
build() {
@@ -59,8 +67,3 @@ package() {
install -D -m644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
}
-md5sums=('12dbb8a996783f7081d538062a8589b7'
- '16cbe2ef60e6f9b22015585bb3209648'
- '0bf7ee4241b12538779c9ecc401d142a'
- 'f87534f54029794bd7be2a123ab01300'
- 'd092827720e4a11549587eb3131123ae')
diff --git a/nonprism/banshee/sqlite_fix.patch b/nonprism/banshee/sqlite_fix.patch
new file mode 100644
index 000000000..880f6ed9f
--- /dev/null
+++ b/nonprism/banshee/sqlite_fix.patch
@@ -0,0 +1,146 @@
+From 700ad9b1686d0b46073b7b2e6cea8e01e30d5f52 Mon Sep 17 00:00:00 2001
+From: Samuel Gyger <gygersamuel@gmail.com>
+Date: Fri, 12 Dec 2014 17:07:45 +0100
+Subject: Database: fix performance for the new SQLite's query planner
+ (bgo#740879)
+
+Starting with sqlite version 3.8.6, a new query planner is used.
+To get back the performance on filling the CoreCache Table,
+this commit provides hints to sqlite (using the UNLIKELY statement).
+But the UNLIKELY statement is only supported in version 3.8.1 and
+above, so in order not to raise the version of the dependency on
+sqlite, we can use this new clause conditionally.
+
+diff --git a/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseAlbumArtistListModel.cs b/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseAlbumArtistListModel.cs
+index dee9c81..e91018b 100644
+--- a/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseAlbumArtistListModel.cs
++++ b/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseAlbumArtistListModel.cs
+@@ -46,7 +46,7 @@ namespace Banshee.Collection.Database
+ ReloadFragmentFormat = @"
+ FROM CoreArtists WHERE CoreArtists.ArtistID IN
+ (SELECT CoreAlbums.ArtistID FROM CoreAlbums, CoreTracks, CoreCache{0}
+- WHERE CoreCache.ModelID = {1} AND
++ WHERE {4}(CoreCache.ModelID = {1}) AND
+ CoreTracks.AlbumID = CoreAlbums.AlbumID AND
+ EXISTS (SELECT 1 FROM CoreArtists WHERE ArtistID = CoreAlbums.ArtistID) AND
+ CoreCache.ItemID = {2} {3})
+diff --git a/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseAlbumListModel.cs b/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseAlbumListModel.cs
+index 0705eab..213f137 100644
+--- a/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseAlbumListModel.cs
++++ b/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseAlbumListModel.cs
+@@ -56,7 +56,7 @@ namespace Banshee.Collection.Database
+ ReloadFragmentFormat = @"
+ FROM CoreAlbums WHERE CoreAlbums.AlbumID IN
+ (SELECT CoreTracks.AlbumID FROM CoreTracks, CoreCache{0}
+- WHERE CoreCache.ModelID = {1} AND
++ WHERE {4}(CoreCache.ModelID = {1}) AND
+ CoreCache.ItemId = {2} {3})
+ ORDER BY CoreAlbums.TitleSortKey, CoreAlbums.ArtistNameSortKey";
+ }
+diff --git a/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseArtistListModel.cs b/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseArtistListModel.cs
+index f7a2b4b..171e9e2 100644
+--- a/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseArtistListModel.cs
++++ b/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseArtistListModel.cs
+@@ -49,7 +49,7 @@ namespace Banshee.Collection.Database
+ ReloadFragmentFormat = @"
+ FROM CoreArtists WHERE CoreArtists.ArtistID IN
+ (SELECT CoreTracks.ArtistID FROM CoreTracks, CoreCache{0}
+- WHERE CoreCache.ModelID = {1} AND
++ WHERE {4}(CoreCache.ModelID = {1}) AND
+ CoreCache.ItemID = {2} {3})
+ ORDER BY NameSortKey";
+ }
+diff --git a/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseFilterListModel.cs b/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseFilterListModel.cs
+index 018a0f4..2a5d4fd 100644
+--- a/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseFilterListModel.cs
++++ b/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseFilterListModel.cs
+@@ -57,10 +57,10 @@ namespace Banshee.Collection.Database
+ }
+
+ protected readonly U select_all_item;
+- private HyenaSqliteConnection connection;
++ private BansheeDbConnection connection;
+
+ public DatabaseFilterListModel (string name, string label, Banshee.Sources.DatabaseSource source,
+- DatabaseTrackListModel trackModel, HyenaSqliteConnection connection, SqliteModelProvider<T> provider, U selectAllItem, string uuid)
++ DatabaseTrackListModel trackModel, BansheeDbConnection connection, SqliteModelProvider<T> provider, U selectAllItem, string uuid)
+ : base (trackModel)
+ {
+ this.source = source;
+@@ -124,7 +124,8 @@ namespace Banshee.Collection.Database
+ "{0}.{1} AND CoreTracks.TrackID = {0}.{2}",
+ FilteredModel.JoinTable, FilteredModel.JoinPrimaryKey, FilteredModel.JoinColumn)
+ : "CoreTracks.TrackID",
+- filtered ? GetFilterFragment () : ""
++ filtered ? GetFilterFragment () : "",
++ connection.LikelihoodSupport ? "UNLIKELY" : ""
+ );
+ }
+
+diff --git a/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseQueryFilterModel.cs b/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseQueryFilterModel.cs
+index a4c00fb..339e351 100644
+--- a/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseQueryFilterModel.cs
++++ b/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseQueryFilterModel.cs
+@@ -37,6 +37,7 @@ using Hyena.Data.Sqlite;
+ using Mono.Unix;
+
+ using Banshee.ServiceStack;
++using Banshee.Database;
+
+ namespace Banshee.Collection.Database
+ {
+@@ -51,7 +52,7 @@ namespace Banshee.Collection.Database
+ private string select_all_fmt;
+
+ public DatabaseQueryFilterModel (Banshee.Sources.DatabaseSource source, DatabaseTrackListModel trackModel,
+- HyenaSqliteConnection connection, string select_all_fmt, string uuid, QueryField field, string filter_column)
++ BansheeDbConnection connection, string select_all_fmt, string uuid, QueryField field, string filter_column)
+ : base (field.Name, field.Label, source, trackModel, connection, QueryFilterInfo<T>.CreateProvider (filter_column, field), new QueryFilterInfo<T> (), String.Format ("{0}-{1}", uuid, field.Name))
+ {
+ this.field = field;
+@@ -59,7 +60,7 @@ namespace Banshee.Collection.Database
+
+ ReloadFragmentFormat = @"
+ FROM CoreTracks, CoreCache{0}
+- WHERE CoreCache.ModelID = {1} AND CoreCache.ItemID = {2} {3}
++ WHERE {4}(CoreCache.ModelID = {1}) AND CoreCache.ItemID = {2} {3}
+ ORDER BY Value";
+
+ QueryFields = new QueryFieldSet (query_filter_field);
+diff --git a/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseYearListModel.cs b/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseYearListModel.cs
+index b58d1df..5f96d2f 100644
+--- a/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseYearListModel.cs
++++ b/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseYearListModel.cs
+@@ -47,7 +47,7 @@ namespace Banshee.Collection.Database
+ FROM (SELECT MIN(CoreTracks.TrackID) AS TrackID, CoreTracks.Year FROM CoreTracks GROUP BY CoreTracks.Year) AS CoreTracks
+ WHERE CoreTracks.Year IN
+ (SELECT CoreTracks.Year FROM CoreTracks, CoreCache{0}
+- WHERE CoreCache.ModelID = {1} AND
++ WHERE {4}(CoreCache.ModelID = {1}) AND
+ CoreCache.ItemID = {2} {3})
+ ORDER BY Year";
+ }
+diff --git a/src/Core/Banshee.Services/Banshee.Database/BansheeDbConnection.cs b/src/Core/Banshee.Services/Banshee.Database/BansheeDbConnection.cs
+index e9bbbf5..3ae0728 100644
+--- a/src/Core/Banshee.Services/Banshee.Database/BansheeDbConnection.cs
++++ b/src/Core/Banshee.Services/Banshee.Database/BansheeDbConnection.cs
+@@ -52,6 +52,16 @@ namespace Banshee.Database
+ get { return configuration; }
+ }
+
++ private bool? likelihood_support = null;
++ public bool LikelihoodSupport {
++ get {
++ if (!likelihood_support.HasValue) {
++ likelihood_support = Query<bool> ("SELECT sqlite_version () >= '3.8.1'");
++ }
++ return likelihood_support.Value;
++ }
++ }
++
+ public BansheeDbConnection () : this (DatabaseFile)
+ {
+ validate_schema = ApplicationContext.CommandLine.Contains ("validate-db-schema");
+--
+cgit v0.10.1
+