No announcement yet.

Partner 728x90


How to improve Visual Studio performance with NinjaTrader project?

  • Filter
  • Time
  • Show
Clear All
new posts

    How to improve Visual Studio performance with NinjaTrader project?


    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 ( 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

    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


      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. :-)


        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.


          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.


          Latest Posts


          Topics Statistics Last Post
          Started by LeonK, Today, 09:26 PM
          0 responses
          1 view
          Last Post LeonK
          by LeonK
          Started by NicholasJoannette, Today, 03:01 PM
          2 responses
          Last Post NicholasJoannette  
          Started by rach1994, Today, 12:20 PM
          1 response
          Last Post bltdavid  
          Started by litamm89, Today, 11:00 AM
          5 responses
          1 like
          Last Post rafael_delima86  
          Started by rafael_delima86, Today, 05:01 PM
          0 responses
          Last Post rafael_delima86