Bug 25437 - Console Performance when output alternates between streams
Summary: Console Performance when output alternates between streams
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 enhancement (vote)
Target Milestone: 2.1 M4   Edit
Assignee: Darin Swanson CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
: 17300 20949 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-10-27 21:28 EST by Darin Wright CLA
Modified: 2003-05-12 16:05 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Wright CLA 2002-10-27 21:28:07 EST
When output alternates between standard out and standard error, console 
performance is poor - as the implementation only polls for output up to a max 
of 8Kbytes, or until streams change. Thus, there is a 100ms delay each time 
output changes streams.
Comment 1 Darin Wright CLA 2002-11-11 11:11:07 EST
*** Bug 20949 has been marked as a duplicate of this bug. ***
Comment 2 Darin Wright CLA 2002-12-10 11:39:09 EST
Fixed. Here is an example program:

public class Alternate {

	public static void main(String[] args) {
		
		int i = 0;
		while (i < 100) {
			System.out.println("Output: " + i);
			System.out.flush();
			System.err.println("Error: " + i);
			System.err.flush();
			i++;
		}
	}
}
Comment 3 Darin Wright CLA 2002-12-10 11:42:01 EST
Please verify, Darin S.

Notes:
* when the example program is run the first time after a workspace re-start, 
output from the streams does not appear in the expected order. This is due to 
plug-in startup and classloading. The program actually runs to completion, 
filling the streams, and then we process each stream resulting in non-
interspersed output (i.e. you can get all the std out output followed by all 
the std err output).
* When run a second, or many times, the output appears interspersed as 
expected. Still, due to timing issues, the output is not guarenteed to be 
interspersed.
Comment 4 Darin Swanson CLA 2002-12-13 18:19:40 EST
Verified.
Comment 5 Darin Wright CLA 2003-05-12 16:05:27 EDT
*** Bug 17300 has been marked as a duplicate of this bug. ***