Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Strategy Analyzer Blocking UI Thread

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Strategy Analyzer Blocking UI Thread

    I want to report another problem with the Strategy Analyzer. I've got a very complex strategy with Loads of properties and Many Enum properties.

    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.

    Users expect an app to remain responsive while it does computation, regardless of the type of machine.



    Attached Files

    #2
    Hello kevinenergy,

    Thank you for your post.

    We will test this on our end and follow up with you here with any details.

    Comment


      #3
      Hello kevinenergy,

      Thank you for the post.

      Thank you for providing the sample script as well. I loaded the script into the Strategy Analyzer and received the same performance degradation. I will submit this behavior to our product management team to see about improving performance of this section of the UI.

      Thanks in advance for your patience.
      Chris L.NinjaTrader Customer Service

      Comment


        #4
        Hi NinjaTrader_ChrisL, It looks like this is still the situation, 5 years down the road. Could you check if this was addressed?

        Comment


          #5
          Originally posted by Shai Samuel View Post
          Hi NinjaTrader_ChrisL, It looks like this is still the situation, 5 years down the road. Could you check if this was addressed?
          Hello Shai Samuel,

          Thank you for your note.

          I will check into this and get you an update. Once I have a tracking number and/or any additional information, I will update you here. In the meantime, please feel free to reach out with any additional questions or concerns.

          Thank you for your patience.
          Emily C.NinjaTrader Customer Service

          Comment


            #6
            Hello Shai Samuel,

            Thank you for your patience.

            I heard back from the development team and they explained that this behavior is expected. As a user clicks on an enum checkbox in the optimization settings, just as when modifying a numeric optimization property, the property grid is reloaded. The time it takes for an enum box to check/uncheck is comparable to the time it takes for a property to update when updating a different property such as an int or double. For example, in the following video I set up an optimization for the Sample MA Crossover and when I change the fast/slow int ranges, it takes a moment for the change in value to register because the property grid is reloaded in the same way it would be when checking/unchecking an enum:
            • https://www.screencast.com/t/SbfIBPok0xY
              • Please note how each time I change the Min, Max, or Increment, if I click away from the box (or press Tab on my keyboard) it takes a moment for that change to be reflected
            Please don't hesitate to reach out with any additional items we may assist you with.
            Emily C.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Tim-c, Today, 03:54 AM
            0 responses
            3 views
            0 likes
            Last Post Tim-c
            by Tim-c
             
            Started by FrancisMorro, Today, 03:24 AM
            0 responses
            3 views
            0 likes
            Last Post FrancisMorro  
            Started by Segwin, 05-07-2018, 02:15 PM
            10 responses
            1,772 views
            0 likes
            Last Post Leafcutter  
            Started by Rapine Heihei, 04-23-2024, 07:51 PM
            2 responses
            31 views
            0 likes
            Last Post Max238
            by Max238
             
            Started by Shansen, 08-30-2019, 10:18 PM
            24 responses
            945 views
            0 likes
            Last Post spwizard  
            Working...
            X