mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-06 18:24:26 +08:00

1. When user opens a file which is bigger than LOAD_SIZE (currently 5M), ask what to do 2. User can normally open the file, cancel, or use the new mechanism: 3. Load a chunk of LOAD_SIZE of SQL into memory 4. Split chunk with parseSQL into single queries 5. Run queries and go on with 3. parseSQL is the bottleneck here, very CPU consuming, as it has to take care of different comment-styles and delimiters. So, the above strategy effected a good compromise regarding overall performance on different tests with worst case SQL files: - "Wide" table exports with many big sized fields => long lines - "Narrow" table exports with only one mini-sized field, extended INSERTs => short lines Especially in the latter case it avoids to cause a hellfire of parseSQL-calls Still seems to have some memory leaks somewhere.
72 lines
2.6 KiB
ObjectPascal
72 lines
2.6 KiB
ObjectPascal
program heidisql;
|
|
|
|
|
|
|
|
uses
|
|
Forms,
|
|
SysUtils,
|
|
Dialogs,
|
|
main in '..\..\source\main.pas' {MainForm},
|
|
childwin in '..\..\source\childwin.pas' {MDIChild},
|
|
about in '..\..\source\about.pas' {AboutBox},
|
|
connections in '..\..\source\connections.pas' {connform},
|
|
createtable in '..\..\source\createtable.pas' {CreateTableForm},
|
|
fieldeditor in '..\..\source\fieldeditor.pas' {FieldEditForm},
|
|
exportsql in '..\..\source\exportsql.pas' {ExportSQLForm},
|
|
tbl_properties in '..\..\source\tbl_properties.pas' {tbl_properties_form},
|
|
tblcomment in '..\..\source\tblcomment.pas' {tablecomment},
|
|
loaddata in '..\..\source\loaddata.pas' {loaddataform},
|
|
usermanager in '..\..\source\usermanager.pas' {UserManagerForm},
|
|
options in '..\..\source\options.pas' {optionsform},
|
|
optimizetables in '..\..\source\optimizetables.pas' {optimize},
|
|
printlist in '..\..\source\printlist.pas' {printlistForm},
|
|
copytable in '..\..\source\copytable.pas' {CopyTableForm},
|
|
edituser in '..\..\source\edituser.pas' {FormEditUser},
|
|
insertfiles in '..\..\source\insertfiles.pas' {frmInsertFiles},
|
|
insertfiles_progress in '..\..\source\insertfiles_progress.pas' {frmInsertFilesProgress},
|
|
helpers in '..\..\source\helpers.pas',
|
|
synchronization in '..\..\source\synchronization.pas',
|
|
communication in '..\..\source\communication.pas',
|
|
threading in '..\..\source\threading.pas',
|
|
sqlhelp in '..\..\source\sqlhelp.pas' {frmSQLhelp},
|
|
queryprogress in '..\..\source\queryprogress.pas' {frmQueryProgress},
|
|
mysqlquery in '..\..\source\mysqlquery.pas',
|
|
mysqlquerythread in '..\..\source\mysqlquerythread.pas',
|
|
mysqlconn in '..\..\source\mysqlconn.pas',
|
|
mysql in '..\..\source\mysql.pas',
|
|
column_selection in '..\..\source\column_selection.pas' {ColumnSelectionForm},
|
|
data_sorting in '..\..\source\data_sorting.pas' {DataSortingForm},
|
|
runsqlfile in '..\..\source\runsqlfile.pas' {RunSQLFileForm};
|
|
|
|
{$R *.RES}
|
|
|
|
begin
|
|
debug('perf: All modules loaded.');
|
|
Application.Initialize;
|
|
Application.Title := APPNAME;
|
|
Application.CreateForm(TMainForm, MainForm);
|
|
debug('perf: Main created.');
|
|
|
|
|
|
try
|
|
try
|
|
InitializeSync(MainForm.Handle);
|
|
SetWindowName(main.discname);
|
|
InitializeThreading(MainForm.Handle);
|
|
InitializeComm(
|
|
MainForm.Handle,
|
|
MainForm.ExecuteRemoteNonQuery,
|
|
MainForm.ExecuteRemoteQuery
|
|
);
|
|
debug('perf: Running.');
|
|
Application.Run;
|
|
finally
|
|
DeInitializeSync;
|
|
end;
|
|
except
|
|
on e: Exception do begin
|
|
ShowMessage(e.ClassName + ': ' + e.Message);
|
|
end;
|
|
end;
|
|
end.
|