Commons Compress
  1. Commons Compress
  2. COMPRESS-234

Patch: TAR InputStream Huge Speed Improvements

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.6
    • Component/s: Archivers
    • Labels:
      None

      Description

      I have looked over TarBuffer And TarArchiveInputStream and found some ways to improve performance orders of magnitude.

      I used a 1 GB TAR archive file (no compression).

      Times for reading all entry file names:
      Current - 630ms
      Mine - 17ms

      Times for extracting all entry files:
      Current 2446ms
      Mine - 2214ms

      As you can see, I have enhanced the "skip" methods greatly. Actual extraction was within a margin of error and the timings bounces around a lot.

      1. TarArchiveInputStream.java.final.patch
        12 kB
        BELUGA BEHR
      2. Archiver_Tar.3.patch
        24 kB
        BELUGA BEHR
      3. Archiver_Tar.2.patch
        24 kB
        BELUGA BEHR
      4. Archiver_Tar.patch
        21 kB
        BELUGA BEHR
      5. TarBuffer.java.patch
        8 kB
        BELUGA BEHR
      6. TarArchiveInputStream.java.patch
        8 kB
        BELUGA BEHR

        Issue Links

          Activity

          BELUGA BEHR created issue -
          BELUGA BEHR made changes -
          Field Original Value New Value
          Attachment TarBuffer.java.patch [ 12591576 ]
          BELUGA BEHR made changes -
          Summary Streamlined TarBuffer Patch: TAR InputStream Huge Speed Improvements
          Description I have looked over Tarbuffer and found some ways to improve performance and readability.

          There were some instances of double-checking exceptions. Most improvement happened in the read() function.
          I have looked over TarBuffer And TarArchiveInputStream and found some ways to improve performance orders of magnitude.

          I used a 1 GB TAR archive file (no compression).

          Times for reading all entry file names:
          Current - 630ms
          Mine - 17ms

          Times for extracting all entry files:
          Current 2446ms
          Mine - 2214ms


          As you can see, I have enhanced the "skip" methods greatly. Actual extraction was within an margin of error as the times bounces around a lot.
          Priority Minor [ 4 ] Major [ 3 ]
          BELUGA BEHR made changes -
          Attachment TarBuffer.java.patch [ 12591576 ]
          BELUGA BEHR made changes -
          Attachment TarArchiveInputStream.java.patch [ 12591941 ]
          Attachment TarBuffer.java.patch [ 12591942 ]
          BELUGA BEHR made changes -
          Description I have looked over TarBuffer And TarArchiveInputStream and found some ways to improve performance orders of magnitude.

          I used a 1 GB TAR archive file (no compression).

          Times for reading all entry file names:
          Current - 630ms
          Mine - 17ms

          Times for extracting all entry files:
          Current 2446ms
          Mine - 2214ms


          As you can see, I have enhanced the "skip" methods greatly. Actual extraction was within an margin of error as the times bounces around a lot.
          I have looked over TarBuffer And TarArchiveInputStream and found some ways to improve performance orders of magnitude.

          I used a 1 GB TAR archive file (no compression).

          Times for reading all entry file names:
          Current - 630ms
          Mine - 17ms

          Times for extracting all entry files:
          Current 2446ms
          Mine - 2214ms


          As you can see, I have enhanced the "skip" methods greatly. Actual extraction was within a margin of error and the timings bounces around a lot.
          BELUGA BEHR made changes -
          Attachment Archiver_Tar.patch [ 12593286 ]
          BELUGA BEHR made changes -
          Attachment Archiver_Tar.2.patch [ 12593402 ]
          BELUGA BEHR made changes -
          Attachment Archiver_Tar.3.patch [ 12593630 ]
          BELUGA BEHR made changes -
          Link This issue relates to COMPRESS-233 [ COMPRESS-233 ]
          BELUGA BEHR made changes -
          Attachment TarArchiveInputStream.java.final.patch [ 12593824 ]
          Stefan Bodewig made changes -
          Link This issue is duplicated by COMPRESS-233 [ COMPRESS-233 ]
          Stefan Bodewig made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Fix Version/s 1.6 [ 12324156 ]
          Resolution Fixed [ 1 ]
          Ilja Pavkovic made changes -
          Link This issue breaks COMPRESS-249 [ COMPRESS-249 ]

            People

            • Assignee:
              Unassigned
              Reporter:
              BELUGA BEHR
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development