Bug Report: Delayed output in Tool Output window
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
Bug Report: Delayed output in Tool Output window
The Tool Output window is exhibiting a delay in displaying output. Rather than immediately presenting the output, the window buffers it. This behavior had been resolved in version 8.5.0 but has reappeared in subsequent versions.
Re: Bug Report: Delayed output in Tool Output window
Hi, it's been 6 months since I posted, and the bug is still present in the latest version (9.5.1). Any updates or help would be appreciated.
Re: Bug Report: Delayed output in Tool Output window
Is the option "Suppress output until completed" checked in the settings for that tool? If not, what kind of program is it?
Re: Bug Report: Delayed output in Tool Output window
Thank you for your response! I’ve checked and confirmed that the "Suppress output until completed" option is not enabled. The issue happens with all tools I use, including GNU Make. It appears that TextPad is buffering the output and only displaying it once the 4096-byte buffer is full, instead of showing it line by line. This behavior was previously fixed in version 8.5.0, as noted under "Issues Resolved" in the release notes: "Tool output buffering prevented display of text a line at a time."
Re: Bug Report: Delayed output in Tool Output window
For efficiency, TextPad attempts to read up to 4096 bytes at a time from the pipe it creates to the tool but the read will return with whatever's available at the time. For example, if you create a tool to run the DOS DIR command, it writes a line at a time. If the tool is buffering its output, rather than writing it a line at a time, TextPad will get the minimum of the size of its buffer and that of the tool.
The other variable is process scheduling by the operating system. If the tool is writing faster than TextPad is reading, the pipe will fill up so its next read will be 4096 bytes.
Do you know how GNU make behaves in this respect?
The other variable is process scheduling by the operating system. If the tool is writing faster than TextPad is reading, the pipe will fill up so its next read will be 4096 bytes.
Do you know how GNU make behaves in this respect?
Re: Bug Report: Delayed output in Tool Output window
Thank you for the explanation. To further investigate TextPad's output behavior, I ran the following batch script in TextPad, which outputs a line of text every second:
I noticed that TextPad didn’t display any output until the script had completed after 10 seconds. This shows that TextPad is buffering the output rather than displaying it line by line.
Code: Select all
:: printlines.bat: Prints a line of text every second
@echo off
for /l %%i in (1, 1, 10) do (
echo Line %%i
timeout /t 1 /nobreak >nul
)
Last edited by AmigoJack on Sun Aug 18, 2024 7:01 am, edited 1 time in total.
Reason: code formatting
Reason: code formatting
Re: Bug Report: Delayed output in Tool Output window
This has been fixed in release 9.5.2 and 8.19.2.