The controls in Soui have both the specified size and the adaptive size of the two types of controls.
Specifies the size of a control that does not need to be re-laid when the content of the control is updated, whereas an adaptive-sized control causes the parent window to re-layout after the content changes.
Recently, some netizens found that the performance of Soui was very low when the adaptive control of a window was updated in high-speed batches (such as 50 times/S Speed batch update of 30 file controls).
The key to tracking discovery is that in a single refresh process, every update of a control needs to be re-laid out, which is obviously inefficient.
There are two ways to solve this problem:
An easy way to do this is to change the adaptive-sized text control to a fixed-size text control, so that you do not need to perform a re-layout on a timed refresh.
One limitation of the above approach is that the desired dimensions of the control must be known at design time and not applicable to layout of controls that do need to be adaptive in size.
To solve this problem, the Soui new kernel adds two methods to Swindow:
void swindow::locklayout () { = TRUE; } void swindow::unlocklayout () { = FALSE; Updatechildrenposition (); }
As the name implies, LockLayout and Unlocklayout are both methods of layout locking and unlocking.
As a result, when you need to bulk update a child window of adaptive size, you only need to lock the layout of the parent window without repeating the window layout.
Note: These two methods are the new additions in 2015.4.27.
A little tip for accelerating adaptive-size control updates in Soui