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 CPU@ 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 sidlercom80, 10-28-2023, 08:49 AM
                    166 responses
                    2,234 views
                    0 likes
                    Last Post sidlercom80  
                    Started by thread, Yesterday, 11:58 PM
                    0 responses
                    1 view
                    0 likes
                    Last Post thread
                    by thread
                     
                    Started by jclose, Yesterday, 09:37 PM
                    0 responses
                    6 views
                    0 likes
                    Last Post jclose
                    by jclose
                     
                    Started by WeyldFalcon, 08-07-2020, 06:13 AM
                    10 responses
                    1,414 views
                    0 likes
                    Last Post Traderontheroad  
                    Started by firefoxforum12, Yesterday, 08:53 PM
                    0 responses
                    11 views
                    0 likes
                    Last Post firefoxforum12  
                    Working...
                    X