Browse Source

* Set bigger buffer size for hosts file to speed up parsing

git-svn-id: trunk@35520 -
michael 8 years ago
parent
commit
b9e03c1aff
1 changed files with 4 additions and 0 deletions
  1. 4 0
      packages/fcl-net/src/netdb.pp

+ 4 - 0
packages/fcl-net/src/netdb.pp

@@ -332,12 +332,16 @@ Var
   L : String;
   A : THostAddr;
   T : PHostListEntry;
+  B : Array of byte;
+  FS : Int64;
   
 begin
   Result:=Nil;
   Assign(F,FileName);
   {$push}{$I-}
   Reset(F);
+  SetLength(B,65355);
+  SetTextBuf(F,B[0],65355);
   {$pop};
   If (IOResult<>0) then
     Exit;