Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8072586

HttpURLConnection.setFixedLengthStreamingMode() performance regression

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 8u31
    • core-libs
    • x86_64
    • linux

      FULL PRODUCT VERSION :
      java version "1.8.0_31"
      Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
      Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      NAME=Fedora
      VERSION="20 (Heisenbug)"
      ID=fedora
      VERSION_ID=20
      PRETTY_NAME="Fedora 20 (Heisenbug)"
      ANSI_COLOR="0;34"
      CPE_NAME="cpe:/o:fedoraproject:fedora:20"
      HOME_URL="https://fedoraproject.org/"
      BUG_REPORT_URL="https://bugzilla.redhat.com/"


      A DESCRIPTION OF THE PROBLEM :
      When the fixedContentLength is set with HttpURLConnection.setFixedLengthStreamingMode(),
      sun.net.www.protocol.http.HttpURLConnection.getOutputStream() is about 6 times slower than the jdk7u25 with fixedLengthStreamingMode is enabled. I checked several jdk7 version , this is introduced since jdk7u40.

      This performance regression can be reproduced with code : https://github.com/jimma/jdk7u40-httpurlconnection-issue.git

      ADDITIONAL REGRESSION INFORMATION:
      This works in jdk7u25.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      git clone https://github.com/jimma/jdk7u40-httpurlconnection-issue.git
      mvn clean install
      compare the output result with setFixedLengthStreamingMode() and without setFixedLengthStreamingMode()


      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      https://github.com/jimma/jdk7u40-httpurlconnection-issue.git
      ---------- END SOURCE ----------

            michaelm Michael McMahon
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: