Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Compile Time

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

    Compile Time

    Hi,

    What factors affect the time taken to compile in NinjaScript Editor?

    When I first started with NT8, I would hear the compile sound almost immediately after hitting F5. Now, with months of use across different versions and with lots of indicators and strategies in the respective folders, it takes up to 5-6 seconds before I hear the compile sound.

    After removing most of my indicators from the folders, compiling is quicker but there is still a considerable delay between F5 and the compile sound (3-4 seconds).

    Is there a way I can make this quicker? Perhaps a cache or something else which needs to be cleared? Also, does using "Exclude From Compilation" help reduce compile time or do the files need to be taken out of the respective folders completely?

    Thanks for your help.

    #2
    What is your main hard drive? Is it ssd?

    Comment


      #3
      Yep, SSD with a pretty high spec CPU and RAM.

      Funny thing is even my Surface Pro 4 compiles faster than my PC (after moving all the strategies/indicators out of the folders).

      Comment


        #4
        Thank you for your question wuileng. NinjaTrader compiles every NinjaScript file in your system all at once every compile, and many NinjaScript files being on your system could slow a compile.

        This said NinjaTrader's compiler is Visual Studio. This publicly available Microsoft blog contains some tips. Although only some of these will be available through the NinjaScript Editor front-end directly, all of them are worth reviewing, and you are encouraged to review your MSVC project file settings inside (My) Documents\NinjaTrader 8\bin\Custom\NinjaTrader.Custom.csproj . While direct help is beyond the scope of the support we may provide, you will likely find switches that are similar to those in the blog and, from there, a starting point to experiment with ways to decrease compile times directly.

        In this blog, I will discuss features, techniques and tools you can use to reduce build time for C++ projects. The primary focus of this post is to improve developer build time for the Debug Configuration as a part of your Edit/Build/Debug cycle (inner development loop).


        I would like to suggest taking advantage of the fact that NinjaTrader compiles every time you edit a file in an external editor and save a change to a NinjaScript file. This will ensure smaller, more frequent compiles as you save frequently. This publicly available page on the Microsoft forums suggests that the MSVS compiler does have an input cache, and so you will likely experience lesser compile times this way. You are encouraged to time this on your own on your unique system configuration to determine if this is of any benefit.



        Finally, if you thoroughly understand the csproj file I mentioned earlier, there are many solutions on the internet similar to programs like ccache, written for MSVS.
        Jessica P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by yertle, Today, 08:38 AM
        1 response
        5 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by love2code2trade, Yesterday, 01:45 PM
        3 responses
        22 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by trilliantrader, Today, 08:16 AM
        2 responses
        6 views
        0 likes
        Last Post trilliantrader  
        Started by samish18, Today, 08:31 AM
        1 response
        2 views
        0 likes
        Last Post NinjaTrader_Clayton  
        Started by Creamers, 09-08-2023, 10:26 AM
        6 responses
        157 views
        0 likes
        Last Post JonyGurt  
        Working...
        X