I use TMemo to display long strings. I was very surprised that method : Memo1.loadfromfile('mem.txt') [mem.txt = 111 kB] took about 35 seconds, what is really really long time.
How can I make TMemo load str开发者_运维知识库ings in real time?
thanx
Because WordWrap property was true...
:-) And you can try
try
Memo1.Lines.BeginUpdate;
Memo1.LoadFromFile('mem.txt');
finally
Memo1.Lines.EndUpdate;
end;
You did not say which version of Delphi you are using. In Delphi 2009 and later, TStrings is now Unicode aware, and thus has to perform additional processing when non-Unicode (Ansi/UTF) encoded files are being loaded.
精彩评论