X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/7131c732cffb1383099b5e1593b3ee4b48635df5..e92207c912aed73a07340b5fb2a9e2cb23e1da5f:/src/store/collection-panel/collection-panel-files/collection-panel-files-actions.ts diff --git a/src/store/collection-panel/collection-panel-files/collection-panel-files-actions.ts b/src/store/collection-panel/collection-panel-files/collection-panel-files-actions.ts index 204d4c0e1d..175a8cef5e 100644 --- a/src/store/collection-panel/collection-panel-files/collection-panel-files-actions.ts +++ b/src/store/collection-panel/collection-panel-files/collection-panel-files-actions.ts @@ -31,15 +31,25 @@ export const COLLECTION_PANEL_LOAD_FILES_THRESHOLD = 40000; export const loadCollectionFiles = (uuid: string) => async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => { + let step = Date.now(); dispatch(progressIndicatorActions.START_WORKING(COLLECTION_PANEL_LOAD_FILES)); const files = await services.collectionService.files(uuid); + 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)); };