Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Render Engine drill down

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

    Render Engine drill down

    In other threads I asked about lagging performance issues with Rendering

    Am I correct in these assumptions?

    1) The Rendering Engine runs in its own thread
    2) Performance of the Rendering Engine is based on the total number of draw objects in the Workspace
    3) The developer cannot set the Rendering Engine thread priority

    The reason I am looking into this is because my Workspace does have a large number of draw objects...but the CPU / GPU / Memory rarely go above 50% for the total system. It seems it is not a hardware issue, nor a latency or bandwidth issue (30ms ping to Chicago, bandwidth 90mbs)

    So, would it be possible to request from your engineers that the ninjascript developer can set a higher priority for the Rendering Engine, as long as it does not impact the Data Engine?

    then, two questions:

    1) Do Transparent Objects have any load on the Rendering Engine?
    2) Do workspaces that are not in focus have an impact on the Rendering Engine, if all the indicators are active (not dormant) in that state?
    3) What happens in the Rendering Engine when switching to a new or out of focus workspace?

    Thx

    #2
    additionally....what is the impact on the Rendering Engine in the Active Workspace on objects that are out of scope (not drawn) on the charts?

    Comment


      #3
      Hello llanqui,

      Rendering is done on the UI thread.

      Rendering is affected by the number of drawn objects. See the help guide on Best Practices.
      Help guide: NinjaScript > NinjaScript Best Practices > Performance practices > Using DrawObjects vs custom graphics in OnRender()

      The developer cannot set the rendering engine thread priority

      Drawing objects not in the viewable area still have OnRender() called and are still running calculations and contribute to performance impact.
      Chelsea B.NinjaTrader Customer Service

      Comment


        #4
        Drawing objects not in the viewable area still have OnRender() called and are still running calculations and contribute to performance impact.Does this mean that as the chart moves forward in time, the old objects need to be rendered constantly?

        also, on workspaces that are not in focus?

        Comment


          #5
          Originally posted by llanqui View Post
          Drawing objects not in the viewable area still have OnRender() called and are still running calculations and contribute to performance impact.


          Does this mean that as the chart moves forward in time, the old objects need to be rendered constantly?

          also, on workspaces that are not in focus?



          Comment


            #6
            The developer cannot set the rendering engine thread priority

            On my system there is an abundance of CPU / GPU / Memory that could be allocated to the Render Engine

            Could you make this a feature request?

            Comment


              #7
              Hello llanqui,

              "Drawing objects not in the viewable area still have OnRender() called and are still running calculations and contribute to performance impact.Does this mean that as the chart moves forward in time, the old objects need to be rendered constantly?"

              Yes, draw object scripts will still be running to see if there is anything that needs to be rendered on each render pass. There may or may not be something to render if the object is not in the viewable area, but it will be the logic in OnRender() checking to see if there should be something rendered.

              "also, on workspaces that are not in focus?"

              Scripts on a tab not in focus will be suspended unless IsSuspendedWhileInactive is set to false.


              "Does this mean that as the chart moves forward in time, the old objects need to be rendered constantly?"

              That depends on if the object is in the viewable area at the time. This changes as you scroll the chart. OnRender() will keep running though to see if something needs to be rendered.


              "On my system there is an abundance of CPU / GPU / Memory that could be allocated to the Render Engine
              Could you make this a feature request?​"

              I will submit a request for NinjaScripts to run on the GPU instead of the CPU.

              Please note, we receive many requests and cannot reasonably implement all requested features or changes. Interest is tracked internally and if enough interest is tracked, it would be weighed against how feasible it would be to make those changes to consider implementing, so we cannot offer an ETA or promise of fulfillment.

              When new features are implemented, they will be listed in the Release Notes page of the Help Guide. The ID number may be different than the internal feature request tracking ID, but the description of the feature will let you know if that feature has been implemented.

              Release Notes - https://ninjatrader.com/support/help...ease_notes.htm


              Just to confirm, you are understanding from the help guide link I've provided not to call a lot of Draw methods from a script and to custom render shapes instead, is this correct?
              Chelsea B.NinjaTrader Customer Service

              Comment


                #8
                Ok, then we both agree that this is not a CPU / GPU / RAM issue?


                yes, I understand the problem is the number of draw objects

                I am reducing the number of draw objects... I use quite a few draw objects on the historical data (one day back on 2 renko and 10 second)

                I use those to study what happened at different alert points, I process a l lot of tick level data...not a problem for the CPU, just for the Rendering

                I can draw those alert points only when I need to study the historical loads...many of these alert points are also held in memory...and I can draw them as the data is loading, or draw them with a toggle button (anchored by time/price)

                if I toggle draw / delete draw historical objects, will that be a problem, if the draw objects are deleted after I study them?

                Comment


                  #9
                  Hello llanqui,

                  If you are experiencing slow performance when using a large amount of drawing objects, this would be expected and the single logical processor in the CPU that the script thread is running on is likely being overloaded.

                  If there are a lot of objects, our help guide advises to not use Drawing tool method calls, and instead custom render the shapes in OnRender().
                  It's also advised to only for shapes that will be visible (ChartBars.FromIndex ChartBars.ToIndex).

                  It's find to remove drawing tool objects with RemoveDrawObject, or not render shapes in OnRender() on future render passes.
                  Chelsea B.NinjaTrader Customer Service

                  Comment


                    #10
                    If you are experiencing slow performance when using a large amount of drawing objects, this would be expected and the single logical processor in the CPU that the script thread is running on is likely being overloaded.Ok, well that is the problem = only one thread for the Rendering.

                    I can study OnRender.and try to integrate it in the future...



                    PS. Don't remember I had this problem in NT7.





                    Comment


                      #11
                      Hello llanqui,

                      Yes, this would be the issue that these would all be running on the same thread to render to the same render target.
                      Chelsea B.NinjaTrader Customer Service

                      Comment


                        #12
                        ok, good...let me know when you get the GPU request submitted

                        that would really help the rendering??

                        Comment


                          #13
                          Hello llanqui,

                          I've added your vote the existing feature request SFT-5076.

                          Even on the GPU the rendertarget would be on one thread and not likely not help much, but possibly that thread might run faster. However, I'm fairly certain this would take a complete redesign of the entire NinjaTrader Platform of pretty much every line of code, so in my opinion is probably considered unfeasible.

                          That said, we already have a solution, which is to custom render the shapes from a single indicator in OnRender(). As there is already a solution the priority on the request goes down.
                          Chelsea B.NinjaTrader Customer Service

                          Comment


                            #14
                            More learning curve on this side... will also see if this is feasible here :-)

                            not anything I can do immediately

                            but have already reduced the number of draw objects considerable

                            Comment


                              #15
                              Given this discussion, can you recommend the best Intel CPU for Ninjatrader?

                              I have an I7 but perhaps an equivalent I5 would be better?

                              Better to have no Virtual Cores?

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                              0 responses
                              580 views
                              0 likes
                              Last Post Geovanny Suaza  
                              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                              0 responses
                              336 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by Mindset, 02-09-2026, 11:44 AM
                              0 responses
                              103 views
                              0 likes
                              Last Post Mindset
                              by Mindset
                               
                              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                              0 responses
                              554 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by RFrosty, 01-28-2026, 06:49 PM
                              0 responses
                              552 views
                              1 like
                              Last Post RFrosty
                              by RFrosty
                               
                              Working...
                              X