When I select Enum Values to Optimize in my strategy, the UI thread gets blocked and it takes about 5-10 seconds for the checkbox to appear.
I've attached a sample strategy that illustrates the problem. I've filled it will loads of empty properties and several enum properties. Open it in the optimizer and then scroll to the bottom of the properties list and select several Options from each of the Enum types. It seems to get worse the more properties you select. The delay is a few seconds on the sample strategy, but on my real strategy it takes about 10 seconds.
I think the bug is caused by work being done directly from the Click/Checked handler of the checkbox. I think it would be easily fixed by doing the work inside a call to Dispatcher.InvokeAsync or by async/await. I have not experienced any blocking like this anywhere else on the Ninjatrader platform so there's definitely something clearly different/wrong with the implementation of the click handler that is used for selecting Enum options on the optimizer.
Comment