During developing and testing web source scripts I frequently look into the debug output file to find out what is actually happening in the script.
In the debug output file normally every single command from the script occupies 12 lines or more, including 4 empty lines. Therefore the range of script commands that appear completely on my screen is limited to three, given the character size I use.
If I remove the empty lines, I can see at least one more command simultaneously on the screen, possibly giving me a better overview of what had happend in the script. Unfortunately the removal of empty lines takes much time, so that I clearly would prefer to not have them in the first place. And after all those empty lines contain no useful information.
Therefore I suggest to not include empty lines in the debug output file, because they take up valuable space that could be better used for displaying more information about what is happening in the script.
Just to show a workaround:
If you open a 411 MB debug file in Notepad++ and then use Edit -> Line Operations
and
"Remove Empty Lines"
or
"Remove Empty Lines (Containing Blank characters)
Deutsch:
Bearbeiten -> Zeilenoperationen

It takes around 20 seconds to reduce the number of lines from 645'288 to 598'823, eliminating around 46'000 empty lines in the process.
Faster (about 10 seconds) runs a one-line-Powershell-Script like this:
Get-Content input_debug.txt | Where-Object { $_.Trim() -ne "" } | Set-Content output_debug.txt
The fastest way, taking about 3 seconds, is this PowerShell v5 script:
$in = 'input_debug.txt'
$out = 'output_debug.txt'
$reader = [System.IO.StreamReader]::new($in)
$writer = [System.IO.StreamWriter]::new($out)
try {
while (-not $reader.EndOfStream) {
$line = $reader.ReadLine()
if (-not [string]::IsNullOrWhiteSpace($line)) {
$writer.WriteLine($line)
}
}
}
finally {
$reader.Dispose()
$writer.Dispose()
}
Yes, you are right. Suppressing the empty lines at source would help in this case.
Thank you for your valuable tips about notepad, this makes it easier and faster to get rid of the empty lines. Now I wait half the time as before.