LaTeX-Utilities icon indicating copy to clipboard operation
LaTeX-Utilities copied to clipboard

Slow texdef execution

Open tecosaur opened this issue 5 years ago • 1 comments

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

tecosaur avatar Aug 07 '19 15:08 tecosaur

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.

leoleoasd avatar Aug 07 '22 05:08 leoleoasd