trichview.com

trichview.support




Speading up Format


Return to index


Author

Message

trond

Posted: 07/06/2002 17:13:40


Hello, I'm using the latest (registered) version of  TRichView. It is

working great, but the Format method works to slow if I'm generating a large

document with a lot of formats in it ( not so many, but switching between

them frequently)


The following code can be used to show this. The styleno 0 is normal Arial

10 text, and styleno 1 is Arial 10 bold text.


   for ( int i = 0; i < 20000; i++ )

   {

      RichView1->AddNL( "This is normal text.", 0, 0 );

      RichView1->AddNL( "Here comes bold text", 1, -1 );

   }

   RichView1->Format();


This take about 8 seconds on my computer to Format, but if I use the same

style format on the second line, the format is done in less than a second.


Any tips to optimize this ?


Best regards

Trond Morken








Powered by ABC Amber Outlook Express Converter