Ticket #494: eitcrawl-lowerdb-load.diff

File eitcrawl-lowerdb-load.diff, 1.5 KB (added by Stuart Auchterlonie, 14 years ago)

Lower DB load

  • libs/libmythtv/eithelper.cpp

    old new  
    117117            continue;
    118118        counter += update_eit_in_db(query1, query2, chanid, **e);
    119119    }
     120    VERBOSE(VB_SCHEDULE, QString("EITHelper: Added %1 events in this pass")
     121            .arg(counter));
    120122
    121     if (counter > 0)
     123    if (counter > 0 && counter < EITHelper::kChunkSize)
    122124    {
    123125        VERBOSE(VB_SCHEDULE,
    124                 QString("EITHelper: Added %1 scheduler events, running "
    125                         "scheduler to check for updates").arg(counter));
     126                QString("EITHelper: running scheduler to check for updates"));
    126127        ScheduledRecording::signalChange(-1);
    127         QString msg = QString("Added %1 scheduler events").arg(counter);
    128         gContext->LogEntry("DVB/ATSC Guide Scanner", LP_INFO, msg, "");
    129128    }
    130129}
    131130
  • libs/libmythtv/eitscanner.cpp

    old new  
    9898            activeScanNextChan++;
    9999        }
    100100
    101         exitThreadCond.wait(200); // sleep up to 200 ms.
     101        exitThreadCond.wait(1000); // sleep up to 1s.
    102102    }
    103103}
    104104