Navigation

    Backtrader Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/

    Cerebro.plot() memory consumption

    General Code/Help
    1
    1
    1011
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Андрей Музыкин
      Андрей Музыкин last edited by Андрей Музыкин

      Hello,
      it seems multiply calls to cerebro.plot(savefile=True) method result in subtile memory leak.
      Here comparative test charts: take a look at BTgymServer process, running backtarder loop, violet line.
      With plotting feature on here is evidence of memory usage increase (40 runs with plot() after every one).
      Second run has no plot calls, memory usage is flat line.

      I guess it can be connected with the known matplotlib memory issues and the fact internalPlot_OldSync.plot() and .savefig() methods do not explicitly close generated matplotlib figures. [or use multiple pyplot import statement]

      Plotting is on:
      memory_usage1

      Plotting is off:
      memory_usage2

      1 Reply Last reply Reply Quote 0
      • 1 / 1
      • First post
        Last post
      Copyright © 2016, 2017, 2018, 2019, 2020, 2021 NodeBB Forums | Contributors