[Mono-bugs] [Bug 525750] New: GZipStream very slow when processing HTTP stream

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Jul 27 21:19:40 EDT 2009


           Summary: GZipStream very slow when processing HTTP stream
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.4.x
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: CORLIB
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: abockover at novell.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---

I have a situation where I want to decompress gzipped data on a web server. On
the server exists an actual gzipped XML file - the server is not performing
compression on the fly to facilitate in transfer rates.

When I create a GZipStream into which I pass the HTTP stream from
HttpWebResponse, I don't get access to the decompressed stream for about 1.5

However, if I perform the same HttpWebRequest and first save the gzipped stream
to disk, and then pass a local file stream to GZipStream to perform the exact
same decompression on the same file, I can access the decompressed data in
about two seconds (this includes the time it takes to download the data to disk
as well).

There's some pathologically slow about this:

using (var s = ((HttpWebResponse)request.GetResponse ()).GetResponseStream ())
    using (var gs = new GZipStream (s, CompressionMode.Decompress)) {
        // work with gs to access the decompressed data

Test case to follow.

Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.

More information about the mono-bugs mailing list