From 94d7f4e9326bbddc054a90a1b502e1ddffd7b396 Mon Sep 17 00:00:00 2001 From: Andreas Preikschat Date: Fri, 11 Mar 2011 19:03:16 +0100 Subject: [PATCH] speed up application start/song search --- openlp/plugins/songs/lib/db.py | 2 +- openlp/plugins/songs/lib/mediaitem.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/openlp/plugins/songs/lib/db.py b/openlp/plugins/songs/lib/db.py index a6255476a..b72517f70 100644 --- a/openlp/plugins/songs/lib/db.py +++ b/openlp/plugins/songs/lib/db.py @@ -256,7 +256,7 @@ def init_schema(url): mapper(Song, songs_table, properties={ 'authors': relation(Author, backref='songs', - secondary=authors_songs_table), + secondary=authors_songs_table, lazy=False), 'book': relation(Book, backref='songs'), 'media_files': relation(MediaFile, backref='songs', secondary=media_files_songs_table), diff --git a/openlp/plugins/songs/lib/mediaitem.py b/openlp/plugins/songs/lib/mediaitem.py index 46c027316..05f8b29bc 100644 --- a/openlp/plugins/songs/lib/mediaitem.py +++ b/openlp/plugins/songs/lib/mediaitem.py @@ -253,9 +253,9 @@ class SongMediaItem(MediaManagerItem): if self.searchAsYouType: search_length = 1 if self.searchTextEdit.currentSearchType() == SongSearch.Entire: - search_length = 7 + search_length = 4 elif self.searchTextEdit.currentSearchType() == SongSearch.Lyrics: - search_length = 6 + search_length = 3 if len(text) > search_length: self.onSearchTextButtonClick() elif len(text) == 0: