Jump to content

How to speed up form creation with dynamic component creation


irigsoft

Recommended Posts

Hello.
I'm trying to find a way to speed up the loading of the main form.
the principle of operation at the moment is the following (everything happens on the server side):
1. Upon login, the customer selects a design to use. This design is stored in a settings file (xml, json, txt)
2. After authorization in the system, the main form loads the file and starts creating the components as they are created in a normal Desktop application, and here in the FormCreate event I use Form.SuspendLayout and in FormReady - Form.ResumeLayout.
Apparently something in my way of working is not right as I get a load time of 20 seconds for a 1.5MB component file (about 200 components like panel, groupbox, button, bitbtn, grid).
I found some advice on the forum about using a hidden panel, but that moves all the main components (whose parent is the main form) and breaks the design, and doesn't make the form load faster.

Can you guide me how to use a hidden panel or other component to speed up the loading of the form components.
I must say that a very small fraction of the components that are in the design are used/seen in the form when it is opened (about 10%).
Most components are shown or hidden based on user actions.

Link to comment
Share on other sites

14 minutes ago, Sherzod said:

Maybe you should reconsider your design?

Use forms, frames, page controls?

Is it possible to use Hidden Panel like parent for non visible components ? - How

Hidden Panel or ContainerPanel ?

is it possible to set style.display=none of some DOM elements? - How

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...