Performance issue Artist view vs. Album view
#1
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:
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?
No log no help.
Main page: https://github.com/Xycl
Repository: Xycl Repository Leia
Repository: Xycl Repository Matrix
Reply
#2
(2012-08-07, 17:35)Xycl Wrote: 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:
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?

Guessing from the code it looks to me like you are not working with latest master. There have been some improvements in the music database and also in retrieving the list of artists. The GetArtistInfo() call isn't there anymore.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#3
Okay my fault. It's the Eden source code.
Next weekend when I'm at home I'll try the latest nightly build on the Zacate machine.
Now I can only access my development laptop. But with a Core i7 it doesn't make sense to discuss 0.5 secs. vs. 0.8 secs.
No log no help.
Main page: https://github.com/Xycl
Repository: Xycl Repository Leia
Repository: Xycl Repository Matrix
Reply

Logout Mark Read Team Forum Stats Members Help
Performance issue Artist view vs. Album view0