HtmlViewer icon indicating copy to clipboard operation
HtmlViewer copied to clipboard

Rendering huge inlined images may lock the rendering process

Open jbartlau opened this issue 7 years ago • 0 comments

When using very large images (our example had 2 MB) and passing the contents via src="data:image/png;base64,...", the rendering eventually seems to stall. The reason is buried in the GetQuotedStr helper in ReadHTML where a character by character concatenation approach is used.

I switched to using a TStringBuilder object which immediately resolves the issue. Ideally, all places where htAppendStr and htAppendChr are used could be changed to TStringBuilder.

jbartlau avatar May 07 '18 12:05 jbartlau