Hi.
I would like to use the script pack as an external editor of functions.
However, when Delphi calls a script a Million times like in this example below the overhead time makes it impossible to use it in a real case scenario. It takes forever...
Each call to run the script takes approximately 0.00034 seconds
How can this be solved? Thanks
LMDScriptControl1.Active := False;
LMDScriptControl1.ClearObjects;
LMDScriptControl1.AddAllUnits;
LMDScriptControl1.Source.Text := Memo1.Text;
edInputNumber.Text :=inttostr(5);
for k:=1 to 1000000 do begin
LMDScriptControl1.AddOrSetValue( 'edInputNumber', TEdit_sw.ToVar(edInputNumber));
LMDScriptControl1.AddOrSetValue('lbResult', TLabel_sw.ToVar(lbResult));
LMDScriptControl1.Active := True;
LMDScriptControl1.Active := False;
end;
Comments