Open jyoo980 opened 3 years ago
Just keeping this documented here as well.
The sequence of traversal commands I've executed for an example PROV-JSON has just been n
, s
, n
, n
, b
but the ~/.history
file contains the following:
n
n
s
n
n
s
n
n
n
s
n
n
s
n
n
n
s
n
n
s
n
n
n
s
n
n
s
n
b
n
, s
, help
, l rsf
, q
n
n
s
n
n
s
help
n
n
s
n
n
s
help
l rsf
n
n
s
n
n
s
help
n
n
s
n
n
s
help
l rsf
q
So I think I might have fixed it? Just by moving the operation for reading the history file outside of the while loop, so now it looks like this:
try: readline.read_history_file()
except: pass
while(True):
userInput = input(">")
try: readline.write_history_file()
except: pass
And now the following traversal commands are reflected exactly in the ~/.history
file if that was meant to be the original intention?
n
, s
, help
, q
n
s
help
q
cc: @Alison-Li
This might be a known issue or something unique to me, but I thought I'd document it anyway. After using
provdebug
a number of times, I noticed a considerable slowdown on the CLI. I had to wait > 10 sec for steps to be processed.Some rudimentary profiling with the Activity Monitor on macOS showed me that
provdb
was consuming at least 99% of the CPU during these slow runtimes.After investigating, I found the bottleneck to be the following lines of code in pvdebug.py
When the
~/.history
file gets too large, there appears to be a considerable slowdown, since the Python process is effectively doing a very expensive disk IO operation on each loop iteration.I "solved" this (rather a workaround) by deleting the
~/.history
file, since I don't need it right now.Specifications
MultilingualProvenanceDebugger
: 60843b330d04d8646c257dd7013395ee8fd7bad1