/[xmltv_parser]/trunk/GBPVRProgramDatabaseFixer/SQLLITE.cs
ViewVC logotype

Diff of /trunk/GBPVRProgramDatabaseFixer/SQLLITE.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 203 by william, Sat Mar 16 22:44:28 2013 UTC revision 204 by william, Sat Mar 16 22:52:22 2013 UTC
# Line 848  namespace GBPVRProgramDatabaseFixer Line 848  namespace GBPVRProgramDatabaseFixer
848          }          }
849          public void UpdateGBPVRPrograms(List<IPROGRAMME> programs)          public void UpdateGBPVRPrograms(List<IPROGRAMME> programs)
850          {          {
851              int ChunkSize = 500;              int ChunkSize = 512;
852              var ChunkList = programs.Chunk<IPROGRAMME>(ChunkSize);              var ChunkList = programs.Chunk<IPROGRAMME>(ChunkSize);
853    
854              double total = programs.Count;              double total = programs.Count;
# Line 861  namespace GBPVRProgramDatabaseFixer Line 861  namespace GBPVRProgramDatabaseFixer
861                  //Stopwatch st2 = new Stopwatch();                  //Stopwatch st2 = new Stopwatch();
862                  //st2.Start();                  //st2.Start();
863                  //progress = 100.0 * (index / total);                  //progress = 100.0 * (index / total);
864                  gLog.Warn.WriteLine("Inserting {0} gbpvr programs ({1} of {2})", p.Count(), index, total);                    //gLog.Warn.WriteLine("Inserting {0} gbpvr programs ({1} of {2})", p.Count(), index, total);  
865                  if (!InsertProgramEntryDatabase(p))                  if (!InsertProgramEntryDatabase(p))
866                  {                  {
867                      gLog.Error.WriteLine("Failed to insert one or more program(s)");                      gLog.Error.WriteLine("Failed to insert one or more program(s)");
# Line 869  namespace GBPVRProgramDatabaseFixer Line 869  namespace GBPVRProgramDatabaseFixer
869                  //st2.Stop();                  //st2.Stop();
870                  //gLog.Warn.WriteLine("    operation took: {0:0.00000} seconds", st2.Elapsed.TotalSeconds);                  //gLog.Warn.WriteLine("    operation took: {0:0.00000} seconds", st2.Elapsed.TotalSeconds);
871                  //gLog.Warn.WriteLine(System.Environment.NewLine);                  //gLog.Warn.WriteLine(System.Environment.NewLine);
872                  //gLog.ReportProgress(this, new ReportProgressEventArgs((int)progress, string.Format("Inserting GBPVR Programs: {0:00}%", (int)progress)));                  gLog.ReportProgress(this, new ReportProgressEventArgs(0, string.Format("Inserting {0} gbpvr programs ({1} of {2})", p.Count(), index, total)));
873                  index += (double)p.Count();                                  index += (double)p.Count();                
874              }              }
875              st1.Stop();              st1.Stop();

Legend:
Removed from v.203  
changed lines
  Added in v.204

  ViewVC Help
Powered by ViewVC 1.1.22