Uploaded image for project: 'Terrier Core'
  1. Terrier Core
  2. TR-143

BitFileBuffered creates unnecessary byte arrays

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0
    • Fix Version/s: 3.5
    • Component/s: .compression
    • Labels:
      None

      Description

      BitFileBuffered creates a new byte[] every time it reads more from disk. Memory allocations in java are expensive, and further GC overheads are introduced. It would be better to either clear it, or even better let it be overwritten by the inBuffer.read() call. Much unit testing would be required.

        Attachments

          Activity

          craigm Craig Macdonald created issue -
          craigm Craig Macdonald made changes -
          Field Original Value New Value
          Summary BitFileBuffered BitFileBuffered creates unnecessary byte arrays
          craigm Craig Macdonald made changes -
          Attachment TREC-212.v0.patch [ 10260 ]
          craigm Craig Macdonald made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          craigm Craig Macdonald made changes -
          Project TREC [ 10010 ] Terrier Core [ 10000 ]
          Key TREC-212 TR-143
          Workflow jira [ 10476 ] Terrier Open Source [ 10536 ]
          Affects Version/s 3.0 [ 10030 ]
          Affects Version/s 3.0 [ 10020 ]
          Component/s .compression [ 10003 ]
          Component/s Core [ 10020 ]
          Fix Version/s 3.1 [ 10040 ]
          Fix Version/s 3.1 [ 10021 ]

            People

            • Assignee:
              craigm Craig Macdonald
              Reporter:
              craigm Craig Macdonald
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: