[NAS-2467] Inefficient coding in BitarchiveAdmin Created: 06/Nov/15 Updated: 19/Feb/16 Resolved: 17/Dec/15
|Reporter:||Colin Rosenthal||Assignee:||Colin Rosenthal|
|Remaining Estimate:||Not Specified|
|Original Estimate:||Not Specified|
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.