I haven't done extensive analysis but I have a feeling there are two main bottlenecks right now that keep the backtester from being fast are:
- logging: all log messages are piped from the childprocess to the main process to the stdout. This should be behind a debug flag or something.
- io: how candles are stored (in sqlite on default) and prepared when doing a backtest is definitely not optimized in any way. Especially in situations where people want to run backtests over the same data (with different strategy settings for example), they can all be calculated once and stored in disk or so.
Before we micro optimize things like moment (which should not be that hard, moment is only really used in any part of the codebase related to backtests for logging purposes and such). But nonetheless I am super open for anyone doing any kind of benchmark to figure out exactly what is slow
- logging: all log messages are piped from the childprocess to the main process to the stdout. This should be behind a debug flag or something.
- io: how candles are stored (in sqlite on default) and prepared when doing a backtest is definitely not optimized in any way. Especially in situations where people want to run backtests over the same data (with different strategy settings for example), they can all be calculated once and stored in disk or so.
Before we micro optimize things like moment (which should not be that hard, moment is only really used in any part of the codebase related to backtests for logging purposes and such). But nonetheless I am super open for anyone doing any kind of benchmark to figure out exactly what is slow