434 views
in GUI Development by
Hello

Is there anyone have information about how much time does it take a completely GUI initiation ?

 /* Startup your subsystem and obtain the frame buffer or display device */
  framebuffer = YourSubsystem_Initialize();

  /* Query the size of your frame buffer or display device */
  YourSubsystem_GetFramebufferSize( framebuffer, &w, &h );

  /* Initialize the Graphics Engine and the Runtime Environment */
  EwInitGraphicsEngine( &framebuffer );

  /* Create the applications root object ... */
  rootObject = (CoreRoot)EwNewObjectIndirect( EwApplicationClass, 0 );
  EwLockObject( rootObject );

  /* ... and initialize the application object. */
  CoreRoot__Initialize( rootObject, EwScreenSize );

  /* Create the viewport object to provide access to the framebuffer */
  viewport = EwInitViewport( EwScreenSize, EwNewRect( 0, 0, w, h ), 0, 255, framebuffer, 0, 0, 0 );

  /* Initialize your device driver(s) that provide data for your GUI */
  YourDevice_Initialize();

Regards

1 Answer

0 votes
by
Hello,

the initialization of an entire GUI application depends mainly on the complexity and the structure of your GUI application.

As you can see within the code sequence, the root object (= your application class) is created. If you have placed many GUI components statically within your application class and all GUI components are using many different / large resources (e.g. full screen images), then the loading will take much longer time compared to a simple GUI application.

Furthermore, the above code snippet contains the initailization of your devices - again, the resulting runtime depends completely on your impelemtation and cannot be estimated based on the provided information.

If you have some problems with the start-up of your application, please let us know how your GUI application is structured, how long it takes and which target you are using. Maybe then we can give you some hints to improve it.

Best regards,

Manfred.
by

@Manfred: if i move component of application class to new unit and make application class as simple as possbile, the initial time might be reduce, right ?

The imagine as below:

by
For the startup time is not important where you store your components. They can be implemented within the unit Application or within any other unit.

Important is, whether you create all instances of your components dynamically during runtime when they are needed or whether you create all instances during startup.

Embedded Wizard Website | Privacy Policy | Imprint

...