[TR-143] BitFileBuffered creates unnecessary byte arrays Created: 02/Feb/11  Updated: 05/Apr/11  Resolved: 31/Mar/11

Status: Resolved
Project: Terrier Core
Component/s: .compression
Affects Version/s: 3.0
Fix Version/s: 3.5

Type: Bug Priority: Minor
Reporter: Craig Macdonald Assignee: Craig Macdonald
Resolution: Fixed  
Labels: None

Attachments: File TREC-212.v0.patch    

 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.

 Comments   
Comment by Craig Macdonald [ 17/Feb/11 ]

Initial patch.

Comment by Craig Macdonald [ 31/Mar/11 ]

This has been in use for a while without adverse affects. Committing and resolving.

Generated at Fri Dec 15 23:18:19 GMT 2017 using JIRA 7.1.1#71004-sha1:d6b2c0d9b7051e9fb5e4eb8ce177ca56d91d7bd8.