History log of /haiku/src/apps/musiccollection/MusicCollectionWindow.h
Revision Date Author Comments
# 08c9600a 14-May-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

Add a simple query app to search all music files on all volumes. Entries are searched and displayed on the fly while typing the search string. The query searches for artist, album and title. After some smaller improvements it could be integrated into media player.

While I was missing such an application I also used it as a playground for eventual tracker improvements. At the moment it works this way: The query is read in a background thread where a list of entry_ref is filled. The entries are exchanged thread safe with the display view using two entry_ref lists which are swapped when the view handled all entries from one list... The view is responsible to display the entry_ref's and load all attributes. In a future directory view, the view would be responsible to load all additional attributes. For example, first fetch the sort column and then asynchronously the rest (as discussed on the mailing list).

- I found the following query issue: when displaying the whole collection the query uses a empty string, the problem is that empty strings are not handled in live queries. For example, when adding a new Media:Artist attribute to a file the file does not show up in the query. Running a none empty query, e.g. Media:Artist contains "test" it shows up. Thats a bug right?

- Only tested it with just ~2100 music file and the on the fly performance is very good. Displaying the complete music list is quite slow, though. This seems to be not a query problem but more a BOutlineView issue. Adding new items to the list seems to be expensive...

- At the moment a new query is started each time you typing a char. A faster solution would be to start just one query in the beginning and then just filter this list. Since BOutlineView seems to be the bottleneck I kept it this way for now. Furthermore, it is a nice performance test for queries.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41493 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 08c9600ab9427c3023d0999fea557dd51343170c 14-May-2011 Clemens Zeidler <clemens.zeidler@googlemail.com>

Add a simple query app to search all music files on all volumes. Entries are searched and displayed on the fly while typing the search string. The query searches for artist, album and title. After some smaller improvements it could be integrated into media player.

While I was missing such an application I also used it as a playground for eventual tracker improvements. At the moment it works this way: The query is read in a background thread where a list of entry_ref is filled. The entries are exchanged thread safe with the display view using two entry_ref lists which are swapped when the view handled all entries from one list... The view is responsible to display the entry_ref's and load all attributes. In a future directory view, the view would be responsible to load all additional attributes. For example, first fetch the sort column and then asynchronously the rest (as discussed on the mailing list).

- I found the following query issue: when displaying the whole collection the query uses a empty string, the problem is that empty strings are not handled in live queries. For example, when adding a new Media:Artist attribute to a file the file does not show up in the query. Running a none empty query, e.g. Media:Artist contains "test" it shows up. Thats a bug right?

- Only tested it with just ~2100 music file and the on the fly performance is very good. Displaying the complete music list is quite slow, though. This seems to be not a query problem but more a BOutlineView issue. Adding new items to the list seems to be expensive...

- At the moment a new query is started each time you typing a char. A faster solution would be to start just one query in the beginning and then just filter this list. Since BOutlineView seems to be the bottleneck I kept it this way for now. Furthermore, it is a nice performance test for queries.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41493 a95241bf-73f2-0310-859d-f6bbb57e9c96