TCustomRichView.LoadRTFFromStream Slowness

General TRichView support forum. Please post your questions here
Post Reply
hxr
Posts: 2
Joined: Mon Jul 14, 2008 5:14 am

TCustomRichView.LoadRTFFromStream Slowness

Post by hxr »

Hello All

I'm using TRichView v 1.9.24 with Turbo Delphi 2006 to display rtf document via LoadRTFFromStream. For a particular document, it is 2M is size and 1.8M of which seems to be header information for fonts, lists, etc. When trying to load this document, it took 5-6 minutes in TRVRTFReader.Parse. I loaded the same document in another non Delphi rtf viewer, it took no time to display it.

Any ideas/suggestions for this?
Thanks
Sergey Tkachenko
Site Admin
Posts: 17569
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

That another rtf viewer may just ignore all this header info, and it displays a text alternative to list markers (even the standard RichEdit does not support MS Word's way of saving bullets&numbering and loads them as a plain text followed by tab).
If this RTF file was created by TRichView, call DeleteUnusedStyles(True,True, True) after loading and resave.
hxr
Posts: 2
Joined: Mon Jul 14, 2008 5:14 am

Post by hxr »

Hi Sergey

I've tried your suggestion. It removed lots of header information from the file and reduced its size from 2M to 150K. The resulting file seems to be the same as it was as RTF and the loading speed problem is solved.

Thanks a lot.
Post Reply