Index: /oup/current/Helper/LevelDB.pas
===================================================================
--- /oup/current/Helper/LevelDB.pas	(revision 141)
+++ /oup/current/Helper/LevelDB.pas	(revision 142)
@@ -75,10 +75,4 @@
 
   DatFileStream, RawFileStream: TMemoryStream;
-
-// ###########################
-  datsum, linksum, rawsum: Int64;
-  freq: Int64;
-  tempticks1, tempticks2: Int64;
-// ###########################
 const
   Steps: Byte = 3;
@@ -298,9 +292,4 @@
   Application.ProcessMessages;
 
-  QueryPerformanceFrequency(freq);
-  datsum := 0;
-  linksum := 0;
-  rawsum := 0;
-
   FileTime := Time;
   for FileID := 0 to DatHeader.Files - 1 do
@@ -311,6 +300,4 @@
     if FileInfo.Size > 0 then
     begin
-      QueryPerformanceCounter(tempticks1);
-
       FilesHeader[FileID].DataAddr := Stream_Body.Size + 8;
       DatFileStream := TMemoryStream.Create;
@@ -320,7 +307,4 @@
       DatFileStream.Write(tempi, 4);
       DatFileStream.Write(LevelID, 4);
-
-      QueryPerformanceCounter(tempticks2);
-      datsum := datsum + (tempticks2 - tempticks1);
 
       DatLinks := Connection.GetDatLinks(FileID);
@@ -337,7 +321,4 @@
         end;
       end;
-
-      QueryPerformanceCounter(tempticks1);
-      linksum := linksum + (tempticks1 - tempticks2);
 
       RawLinks := Connection.GetRawList(FileID);
@@ -367,7 +348,4 @@
       DatFileStream.Seek(0, soFromBeginning);
       Stream_Body.CopyFrom(DatFileStream, DatFileStream.Size);
-
-      QueryPerformanceCounter(tempticks2);
-      rawsum := rawsum + (tempticks2 - tempticks1);
     end
     else
@@ -392,9 +370,4 @@
   end;
 
-  ShowMessage('AvgDats: ' + FloatToStr((datsum / progress.Max) / freq) + #13#10 +
-      'AvgLinks: ' + FloatToStr((linksum / progress.Max) / freq) + #13#10 +
-      'AvgRaws: ' + FloatToStr((rawsum / progress.Max) / freq)
-   );
-
   Stream_Dat.Write(DatHeader, SizeOf(DatHeader));
   for i := 0 to High(FilesHeader) do
@@ -451,5 +424,4 @@
   BeginTime, FileTime: Double;
   Step:       Integer;
-  LevelID:    Integer;
   TimeFormat: TFormatSettings;
 
@@ -460,9 +432,6 @@
   FileID:     Integer;
 
-  Strings:    TStrings;
   i:          Integer;
   temps:      String;
-  tempi:      Integer;
-  tempb:      Byte;
   tempdata:   TByteData;
   FileInfo:   TFileInfo;
@@ -636,4 +605,5 @@
   Application.ProcessMessages;
 
+  FileTime := Time;
   Database.StartTransaction;
   for FileID := 0 to Connection.GetFileCount - 1 do
@@ -710,5 +680,5 @@
     if ((FileID mod 10) = 0) and (FileID >= 100) then
       lbl_estimation.Caption := 'Estimated time left: ' + TimeToStr(
-        (Time - BeginTime) / FileID * (progress.Max - FileID + 1) * 1.1, timeformat );
+        (Time - FileTime) / FileID * (progress.Max - FileID + 1) * 1.1, timeformat );
     progress.Position := FileID;
     lbl_progress.Caption := 'Files done: ' + IntToStr(FileID) + '/' + IntToStr(progress.Max);
