Use buffered writing to write records#196
Merged
nkaz001 merged 3 commits intonkaz001:masterfrom Mar 30, 2025
volemont:patch-1
Merged
Use buffered writing to write records#196nkaz001 merged 3 commits intonkaz001:masterfrom volemont:patch-1
nkaz001 merged 3 commits intonkaz001:masterfrom
volemont:patch-1
Conversation
Owner
|
Isn't it enough to replace |
Contributor
Author
|
The code is courtesy of ChatGPT. Chain of thought: Key Improvements
Do you prefer to remove the other changes and just keep |
Owner
|
I think using |
This reverts commit 7ac2065.
Contributor
Author
|
I reverted my previous commit and implemented your requested changes in 45db00d. Master (commit ac9cbc9) with test script (master...volemont:hftbacktest-1:master): ❯ python -u 5_backtest.py
PEOPLEUSDT: 0
Elapsed time: 0:00:17.057809This PR branch with commit 45db00d: ❯ python -u 5_backtest.py
PEOPLEUSDT: 0
Elapsed time: 0:00:10.035907 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I noticed that writing backtest results to csv takes a long time for large assets such as BTCUSDT. This PR uses buffered writing to speed-up the writing significantly.