-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major
-
Affects Version/s: 1.3.17
-
Component/s: S2Windows.NET
-
None
100を越えるようなコントロールがある場合、バインドする速度が遅い。
ユーザーより下記のようなソース提供がある
「対策として _SetDataToControls での
Control[] controls = _GetControls(this);
foreach (Control control in controls) {
を以下のようなメソッドでHashTableを使用することで
PropertyInfo の ForEach 内のバインド処理速度の向上を
図っています。
private static void _GetAllControls(Control controls, Hashtable table)
{
foreach (Control control in controls.Controls)
{
if (String.Equals(control.Name.ToLower(), String.Empty) == false)
}
}
あと、上記 Control[] controls = _GetControls(this); に加え
object[] attributes
= formType.GetCustomAttributes(typeof(ControlAttribute), false);
を全てのメソッドで PropertyInfo の ForEach ループ外に
出しています。」