libsaria: Change the number of tracks indexed at once
I was doing 50, but I think I can handle 100. I also defined a constant at the top of the file to make it easier to change this value again in the future.
This commit is contained in:
parent
6e033513c0
commit
ffbaff27ec
|
@ -8,6 +8,8 @@ using namespace std;
|
|||
#include <libsaria/format.h>
|
||||
#include "library.h"
|
||||
|
||||
#define MAX_TRACKS 100
|
||||
|
||||
static map<string, set<ino_t> > substr_index;
|
||||
static set<ino_t> results;
|
||||
static string cur_filter;
|
||||
|
@ -79,7 +81,7 @@ static void reindex_path(list<TrackTag> *tag_list)
|
|||
for (it = tag_list->begin(); it != tag_list->end(); it++) {
|
||||
task->index_track(&(*it));
|
||||
i++;
|
||||
if (i == 50) {
|
||||
if (i == MAX_TRACKS) {
|
||||
task->queue();
|
||||
task = new IndexTask();
|
||||
i = 0;
|
||||
|
|
Loading…
Reference in New Issue