2012-08-07, 17:35
I mainly use XBMC as a music player. My library contains 1800 albums and 1200 artists (with albums)
My main living room HTPC contains an AMD Zacate e350 CPU.
Selecting the 1800 albums takes 1 sec. Selecting the 1200 artists takes 3 secs. (everything rounded up or down)
That means that the library artist view is 4.5 times slower than the album view!
Therefore I played with method CMusicDatabase::GetArtistsNav() in order to make it quicker.
My solution is to change the loop in which the data is fetched:
Problem: I don't know the reason for the GetArtistInfo() call. Everything "seems" to work. Even the Info key gives me the artist info.
Am I wrong or is this a possible performance optimization?
My main living room HTPC contains an AMD Zacate e350 CPU.
Selecting the 1800 albums takes 1 sec. Selecting the 1200 artists takes 3 secs. (everything rounded up or down)
That means that the library artist view is 4.5 times slower than the album view!
Therefore I played with method CMusicDatabase::GetArtistsNav() in order to make it quicker.
My solution is to change the loop in which the data is fetched:
Code:
// get data from returned rows
while (!m_pDS->eof())
{
CStdString strArtist = m_pDS->fv("strArtist").get_asString();
CFileItemPtr pItem(new CFileItem(strArtist));
pItem->GetMusicInfoTag()->SetArtist(strArtist);
CStdString strDir;
int idArtist = m_pDS->fv("idArtist").get_asInt();
strDir.Format("%ld/", idArtist);
pItem->SetPath(strBaseDir + strDir);
pItem->m_bIsFolder=true;
pItem->GetMusicInfoTag()->SetDatabaseId(idArtist);
if (CFile::Exists(pItem->GetCachedArtistThumb()))
pItem->SetThumbnailImage(pItem->GetCachedArtistThumb());
pItem->SetIconImage("DefaultArtist.png");
/*
CArtist artist;
GetArtistInfo(idArtist,artist,false);
SetPropertiesFromArtist(*pItem,artist);
*/
items.Add(pItem);
m_pDS->next();
}
Problem: I don't know the reason for the GetArtistInfo() call. Everything "seems" to work. Even the Info key gives me the artist info.
Am I wrong or is this a possible performance optimization?