Einzelnen Beitrag anzeigen

Kas Ob.

Registriert seit: 3. Sep 2023
347 Beiträge
 
#13

AW: Desaströse Performance von TRichedit

  Alt 12. Sep 2024, 15:52
Well, if someone reading my writing somewhere, then try this

Delphi-Quellcode:
var
  Stream:TMemoryStream;
begin
  Stream := TMemoryStream.Create;
  try
    Stream.LoadFromFile(FILE_NAMEXX);
    Stream.Position := 0;
    RichEdit1.Lines.LoadFromStream(Stream);
  finally
    Stream.Free;
  end;
end;
The problem is known, which is the ****** stream handling in RTL, and also in VCL, it does many small read at 2kb (like it was bronze age) instead of 64kb, anyway TMemoryStream will load this stuff in full in memory and feed it, this should be faster, (Well in theory and in my slow brain)
Kas
  Mit Zitat antworten Zitat