/[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 218 by william, Sun Mar 17 01:31:28 2013 UTC revision 219 by william, Sun Mar 17 01:43:24 2013 UTC
# Line 825  namespace GBPVRProgramDatabaseFixer Line 825  namespace GBPVRProgramDatabaseFixer
825          public void RemoveOldGBPVRPrograms(List<SQLLITE.IPROGRAMME> programs)          public void RemoveOldGBPVRPrograms(List<SQLLITE.IPROGRAMME> programs)
826          {                      {            
827              gLog.Info.WriteLine("Removing {0} gbpvr programs.", programs.Count);              gLog.Info.WriteLine("Removing {0} gbpvr programs.", programs.Count);
828              int ChunkSize = 1;              int ChunkSize = 100;
829              var ChunkList = programs.Chunk<IPROGRAMME>(ChunkSize);              var ChunkList = programs.Chunk<IPROGRAMME>(ChunkSize);
830              double total = programs.Count;              double total = programs.Count;
831              double index = 0;              double index = 0;
# Line 842  namespace GBPVRProgramDatabaseFixer Line 842  namespace GBPVRProgramDatabaseFixer
842                  gLog.ReportProgress(this, new ReportProgressEventArgs((int)progress, string.Format("Removing old gbpvr programs ({0} of {1}) {2:00}%", index, total, (int)progress)));                  gLog.ReportProgress(this, new ReportProgressEventArgs((int)progress, string.Format("Removing old gbpvr programs ({0} of {1}) {2:00}%", index, total, (int)progress)));
843                  index += (double)p.Count();                  index += (double)p.Count();
844              }              }
845                gLog.ReportProgress(this, new ReportProgressEventArgs((int)progress, string.Format("Removing old gbpvr programs ({0} of {1}) {2:00}%", index, total, (int)progress)));
846              st1.Stop();              st1.Stop();
847              gLog.Warn.WriteLine("    operation took: {0:0.00000} seconds overall", st1.Elapsed.TotalSeconds);              gLog.Warn.WriteLine("    operation took: {0:0.00000} seconds overall", st1.Elapsed.TotalSeconds);
848          }          }
# Line 866  namespace GBPVRProgramDatabaseFixer Line 867  namespace GBPVRProgramDatabaseFixer
867                  gLog.ReportProgress(this, new ReportProgressEventArgs((int)progress, string.Format("Updating gbpvr programs ({0} of {1}) {2:00}%", index, total, (int)progress)));                  gLog.ReportProgress(this, new ReportProgressEventArgs((int)progress, string.Format("Updating gbpvr programs ({0} of {1}) {2:00}%", index, total, (int)progress)));
868                  index += (double)p.Count();                                  index += (double)p.Count();                
869              }              }
870                gLog.ReportProgress(this, new ReportProgressEventArgs((int)progress, string.Format("Updating gbpvr programs ({0} of {1}) {2:00}%", index, total, (int)progress)));
871              st1.Stop();              st1.Stop();
872              gLog.Warn.WriteLine("    operation took: {0:0.00000} seconds overall", st1.Elapsed.TotalSeconds);              gLog.Warn.WriteLine("    operation took: {0:0.00000} seconds overall", st1.Elapsed.TotalSeconds);
873          }          }

Legend:
Removed from v.218  
changed lines
  Added in v.219

  ViewVC Help
Powered by ViewVC 1.1.22