LaTeX-Utilities
LaTeX-Utilities copied to clipboard
Slow texdef execution
For the "Go to definition" command is slower than it needs to be. We only need the first line of output. For some texdef
commands the first line can be produced well before the command exits.
- Time for specific command to finish
~3s
- Time for first line
~1s
- Time for
child_process
to get first data~3s
Hence I suspect that the way this is currently working could benefit from a significant improvement.
Note: most texdef command execute significantly faster, this is just one particular case
My suspicion is that when texdef
detects its STDOUT is a pipe rather than a real terminal, its buffer strategy changed from line buffering to block buffering. Maybe we need to change the source of texdef
to force it to flush its STDOUT after every line.