Author Topic: Exclude folders from the Minischeduler  (Read 132 times)

Lukeman

  • Regular
  • *
  • Posts: 256
  • mAirList Home Studio 6.0.4 build 3623
    • View Profile
    • Email
Exclude folders from the Minischeduler
« on: September 15, 2017, 13:58:39 »
In order to speed things up in the Mini-Scheduler, it might be an idea to be able to exclude some virtual folders from the Scheduler. I'm using a large folder as an archive, songs are not picked from this folder. According to the logs, all folders are checked at the beginning of a scheduler "run".

Torben

  • Administrator
  • Doktor mAirList
  • *****
  • Posts: 16208
    • View Profile
Re: Exclude folders from the Minischeduler
« Reply #1 on: September 16, 2017, 19:12:02 »
I don't think I understand the question. "All folders are checked", what do you mean by that?

You "include" a folder by using it from an Hour Template or Music Template. If you don't use it in any template, it will just be ignored by the scheduler.

Lukeman

  • Regular
  • *
  • Posts: 256
  • mAirList Home Studio 6.0.4 build 3623
    • View Profile
    • Email
Re: Exclude folders from the Minischeduler
« Reply #2 on: September 17, 2017, 00:28:50 »
I had a look at a Scheduler Log file and I noticed, that the Scheduler is making a list of all artist first. This list also includes artists from several virtual folders which are not used in any Hour- or Music template. Like "Henk Wijngaard" (see screenshot), which only resides in the virtual folder "Carnaval". A folder which is never used in any template.

Right after this, the Scheduler makes a list of all titles. This list also includes songs from the same "Carnaval" virtual folder.

I'm having several virtual folders like this which are not used in any template. Still, as far as I can tell, all the titles and all the artists from these never used folders popup in the Schedulers list.

It looks like the Scheduler is not ignoring these folders. My guess is that it would speed things up if it did.

I hope this will clarify things a little  ;)

Torben

  • Administrator
  • Doktor mAirList
  • *****
  • Posts: 16208
    • View Profile
Re: Exclude folders from the Minischeduler
« Reply #3 on: September 18, 2017, 08:19:28 »
Ok, I see what you mean.

The artist and title separation data is fetched during the initialization phase, before any templates are processed. At this time, the scheduler doesn't even know which templates will be used, and which folders are used inside those templates.

The numbers at the beginning of the line is the timestamp (in milliseconds) of the scheduler run. As you can see, it takes just over 700 milliseconds to fetch the (entire) list of artists and their last use time. This is a single (!) SQL query using efficient idindices - as fast as it gets.

Fetching all templates first and then limiting the artist search to the particular folders would probably take much longer (multiple SQL queries, filtering, ...).

Lukeman

  • Regular
  • *
  • Posts: 256
  • mAirList Home Studio 6.0.4 build 3623
    • View Profile
    • Email
Re: Exclude folders from the Minischeduler
« Reply #4 on: September 19, 2017, 13:23:52 »
But if you look at the bottom of the same list, the time it took to create the whole list with artists, is  now 1623 milliseconds. And when you look at the end of the song list, the time has increased to 10094 milliseconds.

That's why I suggested the option to exclude some virtual directories (like the archive folder) in order to reduce the 12 seconds to much less. But it's just a suggestion  ;)

« Last Edit: September 19, 2017, 13:26:12 by Lukeman »

Torben

  • Administrator
  • Doktor mAirList
  • *****
  • Posts: 16208
    • View Profile
Re: Exclude folders from the Minischeduler
« Reply #5 on: October 17, 2017, 08:52:11 »
By the time the list is fetched, the scheduler does not know which folders will be actually be used.

Lukeman

  • Regular
  • *
  • Posts: 256
  • mAirList Home Studio 6.0.4 build 3623
    • View Profile
    • Email
Re: Exclude folders from the Minischeduler
« Reply #6 on: October 17, 2017, 20:15:20 »
OK, I see your point Torben, thanks for your reply  :)