QNX RTOS v4 Knowledge Base
QNX RTOS v4 Knowledge Base
Title |
Why is creating many widgets from code too slow? |
Ref. No. |
QNX.000002436 |
Category(ies) |
Development |
Issue |
This question arises because if I use the steps 1-3 below at startup time, the startup of the app is too slow for my client.
I would like to 1. Create a Photon app. 2. Create a window. This question probably applies to using the base window as well, so I may not have to specify using a new window. 3. Using C, fill the window with 300 widgets. I am using C so that the placement/alignment is easier to complete. 4. Save the window in question (including the base window if appropriate) as a .wgtw file so that when the program is started next time, it will load faster.
I have created an app with 2 windows. The first is designed in PhAB and loads quickly. The second is created as above and loads slowly. I am not interested in saving space on the hard drive; speed is critical here. So I am trying to solve two issue: the first is ease of placement of 300 widgets on a screen (and I have several screens with this number of widgets, all different), and speed up the startup process.
|
Solution |
Your choices are clear, either to create in code (slow), or to create in PhAB (slow, but fast in the end run). For the second, you can align them easily, but entering in their positions via the text (number) boxes at the top of the screen, or using the arrow keys to position them. Or if they are generic widgets (identical), you can make 1, copy and paste it, and select 2, copy and paste them, and then select 4...8...16....32....64.... Any variation of the techniques would do.
|
|