![]() |
AW: Desaströse Performance von TRichedit
TextDateien ohne Formatierung ... warum überhaupt in ein RichEdit anstatt in ein Memo?
|
AW: Desaströse Performance von TRichedit
Zitat:
Zitat:
|
AW: Desaströse Performance von TRichedit
Well, if someone reading my writing somewhere, then try this
Delphi-Quellcode:
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)
var
Stream:TMemoryStream; begin Stream := TMemoryStream.Create; try Stream.LoadFromFile(FILE_NAMEXX); Stream.Position := 0; RichEdit1.Lines.LoadFromStream(Stream); finally Stream.Free; end; end; |
AW: Desaströse Performance von TRichedit
Zitat:
|
AW: Desaströse Performance von TRichedit
Zitat:
SynEdit/SynMemo oder dergleichen? oder das neue Direct2D-RichEdit ... müsste man doch bestimmt gut im FireMokey einbinden können. (der Start von dem Geraffel dauert zwar ewig, aber danach scheint es schnell zu sein) |
AW: Desaströse Performance von TRichedit
What about this
Delphi-Quellcode:
var
Stream: TMemoryStream; begin Stream := TMemoryStream.Create; try Stream.LoadFromFile(FILE_NAME); SendMessage(RichEdit1.Handle, WM_SETTEXT, LPARAM(0), WPARAM(Stream.Memory)); // better to add to the stream another byte with 0 or double bytes with 0, but for testing now //Stream.Position := 0; //RichEdit1.Lines.LoadFromStream(Stream); finally Stream.Free; end; end; |
AW: Desaströse Performance von TRichedit
Zitat:
SendMessage = SendMessageW = Unicode Is your file also Unicode? |
AW: Desaströse Performance von TRichedit
Zitat:
Notice by sending the stream in full as it in the file, meaning the header included U+FEFF BOM header, yet the Window class recognized it, and handle it right, this even should work with Delphi 5. But was it faster ? |
AW: Desaströse Performance von TRichedit
Zitat:
Anyway, the TMemoryStream approach is quite similar to setting the Text or SelText with a string. It doesn't affect the performance, though. |
AW: Desaströse Performance von TRichedit
Zitat:
Beispiel Track 4344 Titel: Morgendämmerung und Siegfried's Rheinfahrt aus "Götterdämmerung". Der Code für 'ä' = $E4 00 Im Dateipfad "Macintosh HD/Users/.../05 Morgendämmerung und Siegfried's Rheinfahrt aus _Götterdämmerung_.m4a" ist der Code für 'ä'= $61 00 08 03 (a + ¨). Wenn ich mit Trichedit.FindText nach 'dämmerung' suche, wird nur das Vorkommen im Text, nicht aber das im Dateipfad gefunden Ich habe allerdings keine Ahnung, warum sich das so gravierend auf die Ausführungszeit auswirkt. Gruß LP |
Alle Zeitangaben in WEZ +1. Es ist jetzt 08:39 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz