This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 9421 - We should use buffered versions of ObjectStreams.
Summary: We should use buffered versions of ObjectStreams.
Status: CLOSED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Infrastructure (show other bugs)
Version: 3.x
Hardware: Sun Solaris
: P3 normal (vote)
Assignee: issues@projects
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2001-02-06 10:27 UTC by anovak
Modified: 2003-07-01 14:18 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description anovak 2001-02-06 10:27:01 UTC
I tried the truss utility and it showed that some reads/writes from NetBeans
during startup are unbuffered.
Following code is taken from ObjectInputStream.java:
private byte peekCode() throws IOException, StreamCorruptedException{
	while (currCode == 0) {

	    int newcode = in.read();	// Read byte from the underlying stream  // THIS IS THE PROBLEM
	    if (newcode < 0)
		throw new EOFException("Expecting code");
Comment 1 anovak 2001-02-06 10:29:59 UTC
Here is a sample output from truss:
(operation, file descriptor, data buffer read, size of data buffer) = number of
read bytes
read(10, " p", 1)				= 1
read(10, " p", 1)				= 1
read(10, " p", 1)				= 1
read(10, " p", 1)				= 1
read(10, " p", 1)				= 1
read(10, " p", 1)				= 1
read(10, " p", 1)				= 1
read(10, " q", 1)				= 1
Comment 2 anovak 2001-02-06 10:30:59 UTC
It seems that ObjectStreams are mostly buffered but not completely.
Comment 3 Jan Chalupa 2001-03-12 12:12:48 UTC
Version: 'Dev' -> 3.2
Comment 4 Jan Chalupa 2001-05-06 14:25:00 UTC
Target milestone -> 3.3
Comment 5 anovak 2001-06-13 14:44:48 UTC
higher prio
Comment 6 Petr Nejedly 2001-06-13 17:36:37 UTC
Fixed together with adding buffering to core's projects code.
Comment 7 Milan Kubec 2002-01-25 11:21:41 UTC
Verified.
Comment 8 Quality Engineering 2003-07-01 14:18:26 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.