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

            People

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

              Dates

              • Created:
                Updated:
                Resolved: