[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: |
|
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 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. |
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 |