TRichView.LoadRTF takes a lot of time to execute
Posted: Tue Jul 01, 2025 6:55 am
We are facing a situation where calling TRichView.LoadRTF takes a lot of time (several minutes), this does not occur with every rtf-file but only with certain ones, these files are not especially large.
When debugging you can see the two routines TCustomRVData.MassSimpleConcate and TCustomRVData.SimpleConcateSubitems are called a massive lot of times, several orders of magnitude more often than with files which do not show this behaviour. (>1 billion vs. 2-3 digit number of times)
This effect can be reproduced with demo "TRichView\Demos\DelphiUnicode\OfficeConverters" and attached file "Problem_Demo.rtf".
Is the rtf file corrupt in any way or is there a flaw in the RichView-code?
Regards,
Lars
When debugging you can see the two routines TCustomRVData.MassSimpleConcate and TCustomRVData.SimpleConcateSubitems are called a massive lot of times, several orders of magnitude more often than with files which do not show this behaviour. (>1 billion vs. 2-3 digit number of times)
This effect can be reproduced with demo "TRichView\Demos\DelphiUnicode\OfficeConverters" and attached file "Problem_Demo.rtf".
Is the rtf file corrupt in any way or is there a flaw in the RichView-code?
Regards,
Lars