AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren

Desaströse Performance von TRichedit

Ein Thema von Maekkelrajter · begonnen am 11. Sep 2024 · letzter Beitrag vom 12. Sep 2024
Antwort Antwort
Benutzerbild von himitsu
himitsu

Registriert seit: 11. Okt 2003
Ort: Elbflorenz
44.388 Beiträge
 
Delphi 12 Athens
 
#1

AW: Desaströse Performance von TRichedit

  Alt 12. Sep 2024, 15:23
What about this
And this is supposed to work in a Delphi since 2009?

SendMessage = SendMessageW = Unicode
Is your file also Unicode?
Ein Therapeut entspricht 1024 Gigapeut.
  Mit Zitat antworten Zitat
Kas Ob.

Registriert seit: 3. Sep 2023
412 Beiträge
 
#2

AW: Desaströse Performance von TRichedit

  Alt 12. Sep 2024, 15:29
What about this
And this is supposed to work in a Delphi since 2009?

SendMessage = SendMessageW = Unicode
Is your file also Unicode?
It should !

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 ?
Kas
  Mit Zitat antworten Zitat
Benutzerbild von Uwe Raabe
Uwe Raabe

Registriert seit: 20. Jan 2006
Ort: Lübbecke
11.664 Beiträge
 
Delphi 12 Athens
 
#3

AW: Desaströse Performance von TRichedit

  Alt 12. Sep 2024, 15:31
Is your file also Unicode?
At least the example files posted above are.

Anyway, the TMemoryStream approach is quite similar to setting the Text or SelText with a string. It doesn't affect the performance, though.
Uwe Raabe
Certified Delphi Master Developer
Embarcadero MVP
Blog: The Art of Delphi Programming
  Mit Zitat antworten Zitat
Kas Ob.

Registriert seit: 3. Sep 2023
412 Beiträge
 
#4

AW: Desaströse Performance von TRichedit

  Alt 12. Sep 2024, 16:00
What about this
And this is supposed to work in a Delphi since 2009?

SendMessage = SendMessageW = Unicode
Is your file also Unicode?
Yes after re-reading more, i think WM_SETTEXT with Delphi 5 or may be even Delphi 7 might not work, as it will fail to handle the BOM marker for UTF16, as the used RichEdit class is version 1.0 and it is
Zitat:
ANSI (single-byte character set (SBCS) and multibyte character set (MBCS)) editing
So will work if the class changed to version 2.0, yet i might be wrong though, all in all this need more digging.
Kas
  Mit Zitat antworten Zitat
Antwort Antwort

Themen-Optionen Thema durchsuchen
Thema durchsuchen:

Erweiterte Suche
Ansicht

Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 13:11 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