Bug Report: Delayed output in Tool Output window

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
SysReset
Posts: 4
Joined: Tue Feb 20, 2024 8:36 pm

Bug Report: Delayed output in Tool Output window

Post by SysReset »

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.
SysReset
Posts: 4
Joined: Tue Feb 20, 2024 8:36 pm

Re: Bug Report: Delayed output in Tool Output window

Post by SysReset »

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.
User avatar
bbadmin
Site Admin
Posts: 878
Joined: Mon Feb 17, 2003 8:54 pm
Contact:

Re: Bug Report: Delayed output in Tool Output window

Post by bbadmin »

Is the option "Suppress output until completed" checked in the settings for that tool? If not, what kind of program is it?
SysReset
Posts: 4
Joined: Tue Feb 20, 2024 8:36 pm

Re: Bug Report: Delayed output in Tool Output window

Post by SysReset »

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."
User avatar
bbadmin
Site Admin
Posts: 878
Joined: Mon Feb 17, 2003 8:54 pm
Contact:

Re: Bug Report: Delayed output in Tool Output window

Post by bbadmin »

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?
SysReset
Posts: 4
Joined: Tue Feb 20, 2024 8:36 pm

Re: Bug Report: Delayed output in Tool Output window

Post by SysReset »

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:

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
)
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.
Last edited by AmigoJack on Sun Aug 18, 2024 7:01 am, edited 1 time in total.
Reason: code formatting
User avatar
bbadmin
Site Admin
Posts: 878
Joined: Mon Feb 17, 2003 8:54 pm
Contact:

Re: Bug Report: Delayed output in Tool Output window

Post by bbadmin »

This has been fixed in release 9.5.2 and 8.19.2.
Post Reply