- dispatch(collectionPanelFilesAction.SET_COLLECTION_FILES(files));
- dispatch(resourcesDataActions.SET_FILES({ uuid, files }));
+ console.log('Get files: ', (Date.now()-step)/1000);
+
+ // Given the array of directories and files, create the appropriate tree nodes,
+ // sort them, and add the complete url to each.
+ step = Date.now();
+ const tree = createCollectionFilesTree(files);
+ console.log('Create tree: ', (Date.now()-step)/1000);
+ step = Date.now();
+ const sorted = sortFilesTree(tree);
+ console.log('Sort tree: ', (Date.now()-step)/1000);
+ step = Date.now();
+ const mapped = mapTreeValues(services.collectionService.extendFileURL)(sorted);
+ console.log('Add URL: ', (Date.now()-step)/1000);
+ step = Date.now();
+ dispatch(collectionPanelFilesAction.SET_COLLECTION_FILES(mapped));
+ console.log('Dispatch: ', (Date.now()-step)/1000);
+ dispatch(progressIndicatorActions.STOP_WORKING(COLLECTION_PANEL_LOAD_FILES));