bug-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug classpath/24259] New: LineInputStream can cause entire underlying s


From: daney at gcc dot gnu dot org
Subject: [Bug classpath/24259] New: LineInputStream can cause entire underlying stream to be buffered to memory.
Date: 7 Oct 2005 16:35:31 -0000

Currently LineInputStream will try to (and succeed) buffer the number of bytes
reported as available() from the underlying InputStream.

This can happen even when repeatedly reading lines from a socket (as is done by
HTTPURLConnection).  It depends on the speed of the system running the code and
the speed of the network connection.  But each time readline() is called, all
the previously read data is available along with any that has accumulated in
the kernel buffers since the last read.  Each successive call allocates more
buffer memory and does more buffer to buffer copying than the previous call
slowing the entire system down enough (but still reading lots of data from the
underlying socket) so that the kernel can buffer up even more data from the
source and have it ready for the next readline() call.


-- 
           Summary: LineInputStream can cause entire underlying stream to be
                    buffered to memory.
           Product: classpath
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: classpath
        AssignedTo: daney at gcc dot gnu dot org
        ReportedBy: daney at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24259





reply via email to

[Prev in Thread] Current Thread [Next in Thread]