Hello support,
I have a PropertyEditor fpr a MultiLine ButtonEdit control. It is working well in simple forms. Now I have one rather complicated form with several ListViews in ListViewAndDetailView-mode. When I use my PropertyEditor in this form, I get extremely low performance when typing inside the TextEdit of the base ButtonEdit control. There is a considerable delay after every keypress.
I debugged in the XAF sources and saw that there are 30 BarManagerHook-instances involved in every keypress. The bars that the hooks belong to are bars belonging to views in the whole mask (not only the view the current ButtonEdit belongs to). I could not achieve to find out if these BarManagerHooks really cause the problem, but it is the only hint I could get.
So my question is: Could it be that these 30 BarManagerHooks cause considerable performance leaks in a ButtonEdit? If so, is there a way to "switch them off"? If not, can you give me any further advice on how I could go on analyzing the problem?
Thank you very much,
Markus
Extreme Performance loss with RepositoryItemButtonEdit when MasterDetailMode = ListViewAndDetailView
Answers
Hello Dennis,
after a lot of profiling I realized that the problem lies in the call of ObjectSpace.SetModified() upon every key press. I found a relatively new property of DetailView: RaiseObjectChangedOnControlValueChanged. Setting this to true eliminates the problem.
Kind regards,
Markus
Hi Markus,
Thank you for the update. I just wanted to ensure that this issue is not caused by standard XAF components. I have just tested StringPropertyEditor (multi line) in a similar scenario and it has worked well.
Probably it is related to your ButtonEdit descendant implementation. In any event, I am glad to hear that you have a working solution using the RaiseObjectChangedOnControlValueChanged property.
Thank you for spending your time to write this update to us. I highly appreciate that.
Thanks,
Dennis
With v19.2.1, we set the DetailView.RaiseObjectChangedOnControlValueChanged property value to false by default. Refer to the Core - The IObjectSpace.ObjectChanged event is not raised in response to the editor's ControlValueChanged event ticket for details.
Hello Markus,
>>
Now I have one rather complicated form with several ListViews in ListViewAndDetailView-mode. When I use my PropertyEditor in this form, I get extremely low performance when typing inside the TextEdit of the base ButtonEdit control. There is a considerable delay after every keypress.
…
So my question is: Could it be that these 30 BarManagerHooks cause considerable performance leaks in a ButtonEdit?
<<
Thank you for reporting this.
As far as I understand, you are using the standard StringPropertyEditor that works in the multi line mode, correct?
I am afraid it is difficult to precisely say whether 30 BarManagerHooks really cause a considerable performance loss without debugging your sample project internally. Please provide us with a small sample project reproducing this problem so that we could research it internally. In addition, please attach your profiling results.
In the meantime, I tested a similar scenario with the MainDemo application (made multi line Title property in the Department DetailView) and it performed pretty well.
Thanks,
Dennis