[NAS-2467] Inefficient coding in BitarchiveAdmin Created: 06/Nov/15  Updated: 19/Feb/16  Resolved: 17/Dec/15

Status: Resolved
Project: NetarchiveSuite
Component/s: Archive
Affects Version/s: 5.0
Fix Version/s: 5.1

Type: Bug Priority: Major
Reporter: Colin Rosenthal Assignee: Colin Rosenthal
Resolution: Fixed  
Labels: None
Remaining Estimate: Not Specified
Time Spent: 5m
Original Estimate: Not Specified

Issue Links:
is duplicated by NAS-2349 List of all files when adding new fil... Resolved
related to NAS-2349 List of all files when adding new fil... Resolved


Jens Henrik has reported that bitapps make far too many directory scans. In BitarchiveAdmin.moveToStorage() there is a call to updateFileList which rescans an entire storage directory, taking many minutes. This appears to ne unnecessary. Why not just add the file to the relevant data structure and update the archiveTime accordingly?

Comment by Søren Vejrup Carlsen (Inactive) [ 06/Nov/15 ]

I agree that the call to updateFilelist in the moveToStorage method (line 296 in (https://github.com/netarchivesuite/netarchivesuite/blob/master/archive/archive-core/src/main/java/dk/netarkivet/archive/bitarchive/BitarchiveAdmin.java ) could be replaced with a new addToFilelist method

Comment by Colin Rosenthal [ 09/Feb/16 ]

I'm not sure how to verify this explicitly, but so far this change has not resulted in any obviously buggy behaviour.

Generated at Mon Mar 30 08:42:19 CEST 2020 using Jira 7.13.8#713008-sha1:1606a5c1e7006e1ab135aac81f7a9566b2dbc3a6.