Inno setup 将Inno Setup Pascal脚本代码拆分为子函数/子过程是否会影响性能?
我直接在Inno setup 将Inno Setup Pascal脚本代码拆分为子函数/子过程是否会影响性能?,inno-setup,pascal,pascalscript,Inno Setup,Pascal,Pascalscript,我直接在InitializedWizard部分创建所有页面(例如,它们没有创建顺序;Page2,Page5,Page1),如 如果我在分开的过程上创建页面,然后像这样调用InitializeWizard,那么会有区别吗 procedure CreatePage1; var Text : TLabel; begin Page2:= CreateCustomPage(Page1.ID, '', ''); Text := TLabel.Create(Page2); Text.Left
InitializedWizard
部分创建所有页面(例如,它们没有创建顺序;Page2,Page5,Page1
),如
如果我在分开的过程
上创建页面,然后像这样调用InitializeWizard
,那么会有区别吗
procedure CreatePage1;
var
Text : TLabel;
begin
Page2:= CreateCustomPage(Page1.ID, '', '');
Text := TLabel.Create(Page2);
Text.Left := ScaleX(0);
Text.Top := ScaleY(35);
Text.Caption := 'Tickets Printer';
Text.Parent := Page2.Surface;
end;
procedure InitializeWizard;
begin
CreatePage1();
CreatePage2();
CreatePage3();
end;
以下各项之间没有实际性能差异:
程序主控;
开始
声明1;
声明2;
结束;
及
程序Child1;
开始
声明1;
结束;
程序2;
开始
声明2;
结束;
程序主管;
开始
儿童1;
儿童2;
结束;
如果是,你问什么。我不确定我是否理解这个问题。你有什么真正的问题吗?或者这只是一个一般性的问题?我在运行安装程序时的性能非常差,我相信更改页面创建顺序会提高性能,但3分钟前,我通过更改插入欢迎页面的图像提取顺序(最后提取的图像)解决了我的问题,现在我将删除这个问题,很抱歉我没有在开始时解释。谢谢。谢谢,这就是我要问的。
procedure CreatePage1;
var
Text : TLabel;
begin
Page2:= CreateCustomPage(Page1.ID, '', '');
Text := TLabel.Create(Page2);
Text.Left := ScaleX(0);
Text.Top := ScaleY(35);
Text.Caption := 'Tickets Printer';
Text.Parent := Page2.Surface;
end;
procedure InitializeWizard;
begin
CreatePage1();
CreatePage2();
CreatePage3();
end;