[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:
Duplicate
is duplicated by NAS-2349 List of all files when adding new fil... Resolved
Related
related to NAS-2349 List of all files when adding new fil... Resolved

 Description   

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?



 Comments   
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 Sep 16 19:17:08 CEST 2019 using Jira 7.13.5#713005-sha1:8d78f1047b9cca7d35d4d13f706b37e27d869e07.