98 views
in GUI Development by
Hi, EW team:

    My problem is:

    I have a panel A, which works as a menu that navigates to other panels. When switching to other panels, for example B, C, the loading of the large surfaces such as bitmap background in B, C, will make the transition laggy. I wonder if there is a way that can preload the big surfaces in B and C when A is active, so that the work load of switching can be less.

   By the way, EW_LAZY_LOAD_BITMAPS is selected as global loading strategy.

 

   Thank you.

Best regards.

Stephen

1 Answer

0 votes
by
Hi:

     I tried to play a trick. I had the big surfaces in B and C also embedded in A, and made them invisible in initialization. After A has been setup, a slot was triggered that made them visible, then these big surface were loaded as lazy loading into RAM and cached. I had their size miminum, and tried to minimize the calculation related to them. Transitions to B and C is smoother now, But now A is laggy in runtime which can be expected.

 

Best regards.

Stephen
by

Hello Stephen,

what you observe is probably related to the time needed when bitmap contents are decompressed. In such case following possibilities could be taken in account:

1. If supported in your target system, you can configure the bitmap to be accessed directly from the code memory. See the mode DirectAccess in attribute Mode. Note, when using DirectAccess, the bitmap is stored uncompressed. It will occupy a lot of space in the flash memory. Furthermore, the access to flash may be slower than the access to RAM. This may impact the screen update performance significantly.

2. When you refer the large bitmap from the Application component instead of from A, the bitmap will be loaded early. On the other hand, it will remain in RAM the whole time. Depending ob the RAM available in your system this may be undesired.

3. Don't use the large bitmap. Depending on its content you can eventually replace it by more primitive views like rectangles or by few smaller bitmaps.

I hope one of the ideas help you further.

best regards

Paul Banach

by
Hi, Paul:

     Is the decompression done on-the-fly or after having been loaded into RAM?

     The platform package VGLITE RGBA8888 does not support direct access. I have tried this way, the flash usage is really huge.

     Now I have placed the preloading trick into the first view of the application to average the time into initialization. This led to another problem of partial refreshment. The first view was not showed as a whole. I'd like to know how to make sure a view is refreshed none or fully.

 

   Thank you.

Best regards.

Stephen
by

Hello Stephen,

you are working with VGLITE. In such case direct access is not possible. Concerning the question "Is the decompression done on-the-fly or after having been loaded into RAM?", the decompression is made when the bitmap is loaded into RAM for the first time. Then the decompressed bitmap is retained in internal cache for later usage unless the cache is flushed due to RAM shortage. During screen update, the decompressed image content from the cache is used. There is no decompression on-the-fly.

Now I have placed the preloading trick into the first view of the application to average the time into initialization. This led to another problem of partial refreshment. The first view was not showed as a whole. I'd like to know how to make sure a view is refreshed none or fully.

I'm not sure what you mean with "make sure a view is refreshed none or fully" or what kind of problem do you observe. If you refer to the screen update, then the update is performed automatically. There is no way to control the 'refreshing'.

Best regards.

Paul

by
Hi, Paul:
      The problem is that in the first screen update, some components are showed earlier and the others later, not simultaneously.



    
Best regards.
Stephen.
by
Hello Stephen,

without knowing your implementation, it is difficult to deduce why the delay occur. What is the difference between the components? From technical point of view, single screen update is performed in a single pass.

Best regards

Paul

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...