Hello Richview Support,
when we start your demo (TRichView\Demos\Delphi\Editors\Editor 1\RVEditDemo.dpr) the application uses about 3MB of memory.
After we loaded a rtf-file (23MB) containing some large images and scrolled down in the editor the application uses about 225Mb of memory.
Is it a bug the application uses this large amount of memory?
We use version 18.6 of TRichview and Delphi Sydney.
We cannot attach mentioned rtf-file because its size exceeds the allowed 256 KiB.
TRichviewEdit uses a lot of memory
-
- Site Admin
- Posts: 17520
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: TRichviewEdit uses a lot of memory
Images need to be stored in memory. It is unavoidable.
Even for compressed graphic formats (like JPEG, PNG or GIF), VCL graphic classes create uncompressed bitmaps to draw themselves, and they may occupy a lot of memory.
PS: When the number of images in a document becomes too large, TRichView destroys some graphic objects and store them in streams to prevent "out of resources" error.
You can define the maximum number of active images in documents by assigning RichViewMaxPictureCount global variable (defined in RVGrCache.pas).
The default value is 100.
If you decide to decrease it, please take performance into account, because if TRichView will need to unpack/repack images too often, drawing will be slower.
Even for compressed graphic formats (like JPEG, PNG or GIF), VCL graphic classes create uncompressed bitmaps to draw themselves, and they may occupy a lot of memory.
PS: When the number of images in a document becomes too large, TRichView destroys some graphic objects and store them in streams to prevent "out of resources" error.
You can define the maximum number of active images in documents by assigning RichViewMaxPictureCount global variable (defined in RVGrCache.pas).
The default value is 100.
If you decide to decrease it, please take performance into account, because if TRichView will need to unpack/repack images too often, drawing will be slower.
Re: TRichviewEdit uses a lot of memory
Ok, thank you for the fast reply and the additional information.