Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to improve Visual Studio performance with NinjaTrader project?

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

    How to improve Visual Studio performance with NinjaTrader project?

    Hi!

    I write NinjaScript code in Visual Studio Community 2019 version 16.4.15. This works nice since Visual Studio is great. The performance of the NinjaScript project isn't great, however.

    For some reason, the NinjaScript project is the only C# project on my computer that's laggy and very resource intensive:

    (see attached image)

    That image shows the computer performance when I'm typing in Visual Studio. (When I don't do anything, there's 0% CPU.)

    I'm not sure what to do about this, since the other C# projects I work with all work fine. I already checked Microsoft's recommendations here (https://docs.microsoft.com/en-us/vis...s?view=vs-2019) but they had no effect.

    Is there a way to make this performance better?

    Thanks in advance for any suggestions. :-)


    Last edited by J_o_s; 03-30-2020, 03:57 AM. Reason: Added additional information

    #2
    Hello J_o_s,

    The only items I could suggest here would be to check if your visual studio has any extensions running and disable those. Items that check code or run analysis over the code are generally going to create more cpu use in VS, having the project open should be very minimal cpu use.

    The NinjaTrader project is a large project which has many files so some performance toll for memory could be expected. I see about 400+ mb used while having the default project open.

    This could also relate to the CPU being used, if you are using a lower end pc that could certainly report as a higher value in the performance graph. On the laptop I am using now it has an I5 processor and the vs solution idles around 0 ~ 1.5% CPU after it has loaded. Initial load of 10 seconds and 50%+ cpu was seen.

    You can also also try excluding items from the project to see what the root cause is or if this relates to the amount of files. When you compile in the NinjaScript editor that should regenerate the visual studio project to re include the items you exclude. Just avoid saving the solution or .csproj while you work.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Thanks for the thorough reply!

      I already have all extensions disabled. The performance lag happens when typing (so IntelliSense related), although it's luckily not that bad that it becomes annoying.

      Thanks for your help. :-)

      Comment


        #4
        I too have noticed IntelliSense is quite slow. I don't think this is NinjaTrader related though. Visual Studio 2017 handled NinjaTrader with regardes to IntelliSense just fine and at times when the performance is bad I'll go back to that version and edit there. Microsoft changed IntelliSense engine in 2019, as well added more functionality. Whatever changes they made have added performance problems with it.

        Comment


          #5
          It's incredibly slow, but as pointed out it has to do with the VS changes from 17 to 19. If you run it in NT8 with very few custom scripts, the performance isn't that bad, but as you increase the quantity the performance gets unbearably slow.

          I'm in the process of looking for solutions, so if anyone has found one I'd love to hear it. Any performance solution I've found so far doesn't seem to be compatible.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by love2code2trade, 04-17-2024, 01:45 PM
          4 responses
          31 views
          0 likes
          Last Post love2code2trade  
          Started by cls71, Today, 04:45 AM
          2 responses
          10 views
          0 likes
          Last Post eDanny
          by eDanny
           
          Started by proptrade13, Today, 11:06 AM
          0 responses
          2 views
          0 likes
          Last Post proptrade13  
          Started by kulwinder73, Today, 10:31 AM
          1 response
          10 views
          0 likes
          Last Post NinjaTrader_Erick  
          Started by RookieTrader, Today, 09:37 AM
          3 responses
          15 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Working...
          X