Restrict HTML formatter for SQL INSERT/REPLACE output in grid export dialog to 100kb, as SynEdit is just too slow when exporting larger strings. Fixes issue #2903.

This commit is contained in:
Ansgar Becker
2012-07-26 17:02:28 +00:00
parent 98028e8344
commit 1d6bc760c8

View File

@ -689,6 +689,8 @@ begin
S.WriteString(tmp);
if radioOutputCopyToClipboard.Checked then begin
// SynEdit's exporter is slow on large strings, see issue #2903
if S.Size < 100*SIZE_KB then begin
case ExportFormat of
efSQLInsert, efSQLReplace: begin
Exporter := TSynExporterHTML.Create(Self);
@ -701,6 +703,7 @@ begin
efHTML: HTML := S;
else HTML := nil;
end;
end;
StreamToClipboard(S, HTML, (ExportFormat=efHTML) and (HTML <> nil));
end else begin
try