• 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

How to improve performance for GetBars and RemoveUnreferencedPoolbarsNow

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

    How to improve performance for GetBars and RemoveUnreferencedPoolbarsNow

    I've been using a code performance profiler to help optimize the run time of my strategies, especially in Strategy Analyzer. When I run Strategy Analyzer (Optimizer), my CPU cores get pegged >90% - which is fine, but I'd like to make sure that they are not doing any unnecessary work.

    I've squeezed all I can out of my code and now the bottlenecks are NT system code. In particular GetBars and RemoveUnreferencedPoolbarsNow. Since these are necessary tasks in order to get data and garbage collect, I assume that nothing can be done to optimize them.

    However, I have been researching using a RAMDisk and/or SSD and was wondering if either of these would help the problem. I used a very small data set in my profile testing and Windows Task Manager does not show that the HDD is being hit when I run Strategy Analyzer and so I believe that it is pulling/cleaning data from RAM, not the disk.

    Any thoughts are appreciated whether related to RAMDisk/SSD or other ideas. Thanks.

    Side Note: A small simple piece of advice that I can offer from my work is that CurrentDayOHL is a CPU hog. It can easily be replaced by simply storing an array of Opens[x][0] for the first bar each day.

    #2
    Hi,

    I do not have any information on how to improve the performance of the methods you mentioned.

    We have not done any particular benchmarks using RAMDisk, however I know quite a few users have experimented with these sorts of tools to help improve performance. We'll leave this thread open for these users to comment on their thoughts and share any ideas they may have that will help you here.
    MatthewNinjaTrader Product Management

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by EnveousColnago, Yesterday, 05:43 PM
    7 responses
    37 views
    0 likes
    Last Post Lancer
    by Lancer
     
    Started by PeterGolz, 01-17-2020, 10:42 AM
    11 responses
    73 views
    0 likes
    Last Post reubenlasky  
    Started by utilizator, Today, 11:36 AM
    0 responses
    6 views
    0 likes
    Last Post utilizator  
    Started by EnveousColnago, Today, 07:24 AM
    1 response
    11 views
    0 likes
    Last Post NinjaTrader_ShawnB  
    Started by tornadoatc, Today, 10:31 AM
    0 responses
    4 views
    0 likes
    Last Post tornadoatc  
    Working...
    X