Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#394: Try simpler solution to limit lines count
- Loading branch information
Showing
2 changed files
with
20 additions
and
10 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
bd6ee68
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
history_file.readlines()
seems to be malloc much memory and inefficient if the history command file is huge, But it should be okay because the log files has size limit or rows limit.bd6ee68
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tail -f
may be is the easiest way to implement the feature, but not pythonic.