• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Slow drawing

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

    Slow drawing

    Do you have had complains about NT8 drawing objects performance ?

    I have converted an indicator from NT7 to NT8. This indicator draws a lot of strings and lines on the chart but there is absolutely no delay in NT7 versus the very slow drawing of NT8.

    Is it something that could be improved in the future ?

    I was thinking at first that it could come from my code but comparing the two NT versions together I know it is related to NT8 ( code has been optimized even more with NT8 ... )

    Here is my computer information :

    Windows 7 Professional
    RAM : 8.00 GB
    64-bit Operating System
    Intel(R) Core(TM) i7-2600 [email protected] 3.40 GHz 3.40 GHz
    Graphics card NVIDIA GeForce GT 425M
    Last edited by blar58; 05-09-2016, 11:50 AM.

    #2
    Hello blar58,

    NinjaTrader 8 has changed the way objects are rendered. All rendering is now done with SharpDX (a DirectX language) and the calculations are now performed on the graphic card instead of on the CPU with GDI+.

    With this change, as long as the computer has a mediocre graphic card, the rendering of objects should be much much faster than NinjaTrader 7.

    Do you have an example script that you have prepared to show the differences between NT7 and NT8?
    If so, please attach this to your next post and I will test.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Chelsea

      Here is my graphics card :
      Graphics card NVIDIA GeForce GT 425M

      Could that be the problem ?

      Comment


        #4
        Hello blar58,

        The GeForce GT 425M should work fine. I believe this is a card with 1GB of graphic memory and a decent clock speed.

        If you are calling NinjaTrader drawing tools, (and not doing custom rendering) I would expect NinjaTrader 8 to draw this faster using the GPU than NinjaTrader 7 on the CPU.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Hello Chelsea

          I am doing custom rendering

          Comment


            #6
            Hello blar58,

            If you are using NinjaTrader Drawing Objects as mentioned in your first post, these correctly re-use brushes and should render faster than NT7.

            However, if you are doing custom rendering, you would need to make sure that you are reusing brushes and not recreating these on each render pass which will take an extreme amount of resources to do and might actually take longer than NT7 if done incorrectly.

            Attached is an example of re-using brushes.
            Attached Files
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              Chelsea

              I think you got it . I will review the code and let you know if that's what happening.

              Thanks !

              Comment


                #8
                Chelsea

                Unfortunately it doesn't seem to solve the problem.

                The indicator is proprietary and way too big I just can't send you the code for testing but I would love if I could have a remote session to look at this with you guys

                Thanks
                Last edited by blar58; 05-10-2016, 12:24 PM.

                Comment


                  #9
                  Hello blar58,

                  As you have not provided any script for me to test on my end, I have taken some time to create a indicator for NT8 and for NT7 to demonstrate the rending while scrolling.

                  The math in these are the same (and i've attempted to keep this as simple as possible but still allow for a lot of rendering to be done).

                  I've also set this so that there is a button that must be clicked before it starts rendering (so that we are not focusing on the loading speed and just focusing on the rending speed).

                  I would like you to test this script on NT7 and NT8 one at a time. Do you feel that the NT7 version of the script is able to render faster?


                  I would like you to look for a line in your trace file.
                  Documents\NinjaTrader 8\trace\trace.20160524.0000.txt

                  You are looking for the line 'DirectXRenderingHW'. This should be 11 lines down from where it shows the session start. Are you seeing this line in the trace?
                  (This lets us know if DirectX is being used for rendering.)
                  Attached Files
                  Last edited by NinjaTrader_ChelseaB; 05-24-2016, 11:54 AM.
                  Chelsea B.NinjaTrader Customer Service

                  Comment


                    #10
                    Thank you Chelsea

                    I will review your code and test it.

                    I greatly appreciate

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by user1986, Today, 07:28 PM
                    0 responses
                    3 views
                    0 likes
                    Last Post user1986  
                    Started by jertrade, Today, 06:57 PM
                    0 responses
                    5 views
                    0 likes
                    Last Post jertrade  
                    Started by Emma1, Today, 02:42 PM
                    1 response
                    17 views
                    0 likes
                    Last Post NinjaTrader_DrewO  
                    Started by fx.practic, Today, 03:10 PM
                    1 response
                    6 views
                    0 likes
                    Last Post NinjaTrader_Jesse  
                    Started by jertrade, Today, 02:50 PM
                    2 responses
                    14 views
                    0 likes
                    Last Post jertrade  
                    Working...
                    X