Currently, the way that new logs are written to records.log is very slow, especially if records.log grows to a large size. Right now, inside run.py, the function rec_write() starts from the beginning of the file, looks for the line where the new entry should be inserted from the beginning and ends up rewriting the entire file. This will probably be very slow if records.log grows to a large size, so instead it would be better to start from the end and work backwards without rewriting the whole file.
Currently, the way that new logs are written to
records.log
is very slow, especially ifrecords.log
grows to a large size. Right now, insiderun.py
, the functionrec_write()
starts from the beginning of the file, looks for the line where the new entry should be inserted from the beginning and ends up rewriting the entire file. This will probably be very slow ifrecords.log
grows to a large size, so instead it would be better to start from the end and work backwards without rewriting the whole file.