Slow loading of TIDEFormDesigner

Hello,
I prepare TMSScripter for integration to our product and I have problem with slow loading of formdesigner, even for runtime purposes when designer is not neccessary. I use standard approach like this:

 FScripter:=TIDEScripter.Create(nil);
 if FLinkedComponent<>nil then FScripter.AddComponent(FLinkedComponent);
 //
 FEngine:=TIDEEngine.Create(nil);
 FEngine.Scripter:=FScripter;
 FEngine.OpenProject(FFileName);

OpenProject takes about 2 seconds to open project with 1 script file and 1 srcipt+form file. TIDEFormDesigner.Create is slow in UpdateGrid method:

      for Y:=0 to Height div FGridStep do
        for X:=0 to Width div FGridStep do
          Pixels[X*FGridStep,Y*FGridStep]:=DotColor;

I think it's not neccessary to create designer or update designer visual componets at runtime.
Is it possible to solve this problem?
Thanks
Zdenek

Can you please send us a project reproducing the issue? To solve optimizations we always need the exact use case, as many variables can affect performance.

send by email

We didn't receive it. E-mail is not reliable. Can you please send it here, you can send me a private message by clicking my name and then clicking "Message" button.

Ok,

In attachment there is a testcase for UpdateGrids. It takes about 500ms.
testcase.zip (53.6 KB)

There is a profiler results in attachment (png picture] also.

For design time, it's ok, but it's not usefull for runtime. Adding possibility to disable/enable grid using property of engine will help.

I'm sorry, but I don't see any delay in your application. I click the button several times and there is not even a small lag. Profilers simply show the application spending more time in clicking or window messaging than any other code.

The slowdown is 300ms, in our application every ms counts. In real world I expect about 100+ loads of TIDEEngine+TIDEScripter (every scripter has different variables and class to access (addcomponent, addclass) and every scripter has preload different project.

Did you consider to make grid lines enabled/disabled by adding property to TIDEngine?

The problem is that we can't debug and optimize it if the time is not significant compared to other operations in the application. The profiler should show significant bottleneck. Are you able to build a demo where the slowdown is significant?

I will prepare example