Completed
Last Updated: 14 Feb 2019 13:56 by ADMIN
Patrick
Created on: 21 Dec 2018 14:42
Category: UI for WPF
Type: Feature Request
1
RichTextBox: Optimize memory consumption when exporting documents with big images to XAML
During the XAML export, by default images are serialized to XAML using the Convert.ToBase64String(byte[]) method. 
When the image is big, this causes allocation of a lot of memory (e.g. for 30MB image, the allocated memory for the string is ~300 MB), and when the base memory consumption of the process is high, this can cause OutOfMemoryException. 
Instead, the conversion to base64 format could be done using Convert.ToBase64String(Byte[], Int32, Int32) on smaller chunks, which are immediately written to the text stream and left to be garbage collected.
1 comment
ADMIN
Peshito
Posted on: 14 Feb 2019 13:56
Available in R1 2019 SP1 release version.