Hi,
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 strings in real time?
thanx
Hi,
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 strings in real time?
thanx
:-) 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.