Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT8 Performance problem around Excessive OnRender calls.

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

    NT8 Performance problem around Excessive OnRender calls.

    I have recently dug deep into some of the performance problems I have seen with NT8 and I'm curious if others experience this as well. In particular, ON my PC I have noticed that high drawings counts or orders can cause extra lag and in some cases charts hang for a few seconds.

    What I believe I have identified is that there may be excess "synchronously forced" calls to OnRender across the system. Particularly around the position/order labels in ChartTrader mode may be causing excessive OnRender calls. Given that these forced calls to OnRender for every single indicator, every single drawing object across all the charts that have ChartTrader enabled (On or Hidden mode), and the calls are multiplied by the number of orders and for each order it appears to trigger for every OnOrderUpdate, the problem can grow exponentially if you have partial fills or scale into your positions in a way that creates new stop/target orders for example. e.g. the math:

    OnRenderCalls = Orders * 3 * (DrawingObjects + Indicators) (*2 if Stop and Target are being affected a same time) [and this is happens in all ChartTrader charts]

    I am curious if others see this kind of performance issue and/or if it's just so noticeable on my PC, while powerful is a few years old now. My charts "Hang" for a number of seconds around order movement, creation, canceling, fills, closing, etc. I do have some Indicators that I know are compute intensive, drawing shaded regions and such, but I have tried to develop them to be as efficient as possible. WIth that said, I've been able to duplicate this lag in SafeMode by just adding a handful of drawings and increasing the Order count to exacerbate the issue.

    I have enclosed a custom indicator that displays some metrics around OnRender calls and "High bursts of Request per second". If you have encountered some of these issues, I encourage you to try this Indicator. Add it to a chart with ChartTrader on, and another window with ChartTrader off so you can see the total difference in OnRender calls over time. To test it at the extreme corner cases you can for example create some positions with an ATM 1 contract at a time, so you end up with multiple stop/target orders and then move the orders around, or watch as they trail the price to see if the RPS burst. Keep in mind that these stats are just the OnRender calls to the Debug Indicator, so this would be multiplied by the number of Drawing Objects and Indicators across your charts.

    A sample of the statistics displayed (extreme case):

    ADebug_OrdersExcessiveOnRender.cs

    Click image for larger version  Name:	SampleOnRenderStats2.png Views:	11 Size:	20.5 KB ID:	1336983
    Attached Files
    Last edited by b.j.d; 03-07-2025, 06:11 PM.

    #2
    Hi!

    Yes, I have the same problem.
    "extra lag and in some cases charts hang for a few seconds"
    many charts stop to char the candles!

    Also one year ago I have the same problem I reduce the number of Candlesticks and work...
    BUT NOW , special in last months I have to reduce more, BUT IS IMPOSSIBLE, BECAUSE i need the charts etc.., let see MA 200... I need historical... I can't reduce more...

    So, the computer is the same and it not old!! And two years ago I not have any problems.

    And If I enable strategies.... forget... many problems.

    So, if the problems continue I have to rethink if going continue using this NT. Special because I try use more strategies in future and to test in paper trade, at moment is many problems.

    Also I want to buy some strategies, but I rethink because is possible to change the platform. I am very unsatisfied with NT.

    Comment


      #3
      I've noticed an interesting effect when a larger size position is closed, even if there is only 1 Stop and 1 Target order. If the Stop fills, I'm not sure if it is because each partial fill comes across individually, or the OCO cascade, but the renders Spike as if there were numerous orders in play. However if the target fills, the spike interestingly does not seem to occur.

      Comment


        #4
        I see you'd commented out order submission to completion tracking due to insignificant delays. However, assuming that panel runs on the UI thread, wouldn't it be worthwhile to track the time user clicks on the order button to order creation?

        Comment


          #5
          MiCe1999 true, I did disable that code, one it was a bit of a adhoc way of collecting the timing that has also bug somewhere that did not even allow it to work, given that I could see the new or moved orders happen so quickly it didn't matter, so I didn't waste time to troubleshoot.

          Where it does matter is on using the close button, at least in playback mode all the orders have to visually close before the sell market orders are placed, which if there is an onrender delay for a bunch of stop orders, this delay can be significant problem in my opinion. In playback the data engine gets paused, unlike what would happen live...

          In order to properly do start to finish timing the actual button. Pushes should start the timer.

          Comment


            #6
            Originally posted by b.j.d View Post
            My charts "Hang" for a number of seconds around order movement, creation, canceling, fills, closing, etc.
            Happened to me too. It's definitely a rendering problem, not lag from the server. A few times I saw the price going through my profit target, and only after 1-2 seconds NT closed the trade.

            Comment


              #7
              Originally posted by b.j.d View Post
              MiCe1999 [...]at least in playback mode all the orders have to visually close before the sell market orders are placed, which if there is an onrender delay for a bunch of stop orders, this delay can be significant problem in my opinion. In playback the data engine gets paused, unlike what would happen live...

              In order to properly do start to finish timing the actual button. Pushes should start the timer.
              Interesting. Would you say a fix for the delay could be to create an indicator with custom CLOSE button that submits order to flatten existing position and then sends cancellAllorders()?

              Comment


                #8
                “charts "Hang" for a number of seconds around order movement, creation, canceling, fills, closing, etc. I do have some Indicators that I know are compute intensive, drawing shaded regions and such,​“

                I have multiple shaded regions but otherwise compute- & render-lite & mostly lag-free

                I ventured to replace DOMs with Chart Trader. Result was same effects as your experience. Same workspace: DOMs- no lag; Chart Trader- lags. Simply put, using Chart Trader in direct replacement of DOMs (I.e. zero other changes) is more resource intensive and overloads my pc’s computational capability. ‘Despite’ drawing shaded regions, Levels etc using indicators, Chart Trader has an impact on performance far greater than those other activities.

                Seems to tally with your experiences.

                Regards,

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                0 responses
                599 views
                0 likes
                Last Post Geovanny Suaza  
                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                0 responses
                344 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
                558 views
                1 like
                Last Post Geovanny Suaza  
                Started by RFrosty, 01-28-2026, 06:49 PM
                0 responses
                557 views
                1 like
                Last Post RFrosty
                by RFrosty
                 
                Working...
                X