View Issue Details

IDProjectCategoryView StatusLast Update
0004417MMW v4Main Panel/Toolbars/Menuspublic2008-03-08 00:49
Reporterpetr Assigned To 
PriorityimmediateSeverityminorReproducibilityalways
Status closedResolutionfixed 
Fixed in Version3.0 
Summary0004417: Regression : expanding any of the Artist node is very slow when filtered
DescriptionWhen filter is active and user will expand any node with Artists (Artist Node, Artist And Album Artist Node etc.) is very slow.
Additional Informationhttp://www.mediamonkey.com/forum/viewtopic.php?t=26019
TagsNo tags attached.
Fixed in build1141

Relationships

related to 0004449 closedLudek Expanding of nodes (if filter is activated) are slow on large DBs 

Activities

petr

2008-02-25 10:41

developer   ~0013201

I've optimized queries used in this part of code and now expanding of Artists nodes is really fast with large libraries.

Ludek

2008-03-05 16:43

developer   ~0013233

Last edited: 2008-03-05 22:11

Maybe it is just fast for some types of filters, but for filter:

Any text field contains "a"

it takes ages now.

The problem is not in the query, this query is probably the best:

    TQ := TQueryPlus.OpenString( 'SELECT Artists.id FROM Artists WHERE Artists.id IN '+
                                 ' (SELECT ArtistsSongs.idArtist FROM ArtistsSongs WHERE'+
                                 ' ArtistsSongs.PersonType=1 AND'+
                                 ' ArtistsSongs.idSong IN '+
                                 ' (SELECT Songs.id FROM Songs WHERE '+
                                 ' ('+FilterQuery+')))'
                               );

But problem is that 'Artists' table is renamed to 'Art', this needs to be replaced by 'Artists' otherwise it will be so slow ( because if selection from Artists table is presented in the FilterQuery variable too then it selects this table again, for clarification see this article:
http://www.jirihajek.net/MMwiki/index.php/Development_guidelines#Query_optimization
which I've added to our dev wiki)


Fixed in build 1141.

peke

2008-03-08 00:49

developer   ~0013248

Tested And verified in 1141.
I can confirm that performance is improved, but I noted this small issue:
1. Library on more than 100k tracks (possibly larger than 50K)
2. Start MM
3. collapse All tree nodes
4. Filters and Views Set From None (Default) to Accessible Track
3. When I Click on [+] in front of Location in some case it takes long to load and MM is Locked for few seconds in 1140 it was 20+ Seconds.

I Closed it as this is now reasonable time.