2

"I would recommend switching to another edit control like SynEdit(it can load 80 mb of text file in few miliseconds)." - more memory for TMemo / TRichEdit

Is it possible?

To load 1,5 Mb takes me 8 sec...

My previous post: Delphi: Form becomes Frozen while assigning strings in thread

I have Delphi 2010 and UniSynEdit for Delphi 2009.

Thanks!

Community
  • 1
  • 1
maxfax
  • 4,281
  • 12
  • 74
  • 120
  • what happened here, is this a new question or did something go wrong? – gordy Jul 18 '11 at 05:28
  • 3
    Maybe you need a faster edit control. Notepad++ loads large files like that much faster. It's based on Scintilla. I believe there are Delphi bindings for Scintilla. – David Heffernan Jul 18 '11 at 08:14

1 Answers1

0

The backend of SynEdit is a TStrings descendant which loads EVERYTHING IN ONE GO if you just use

ASynEdit.Lines.LoadFromFile

You could use on demand loading (i.e. just load visible lines, perhaps with 10 lines before and after) but you have to handle it yourself.

LeleDumbo
  • 9,192
  • 4
  • 24
  • 38
  • Are you loading it from USB or something? Thats horrendously slow – BugFinder Jul 18 '11 at 07:06
  • From HD. Did you try? Try in regular Notepad. – maxfax Jul 18 '11 at 07:35
  • hmm... maybe I'm not clear enough. I mean, DON'T use `ASynEdit.Lines.LoadFromFile` as it will load the whole file, you have to use on demand loading technique which should only load the visible parts of the file – LeleDumbo Jul 18 '11 at 15:03