Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
1.2.0
-
None
-
None
Description
When there are many files in the Linux directory, an error occurs and the connection is disconnected.
Currently, there are more than 40,000 files in a specific directory, and an error occurs when searching the file list through SFTP. I think, this case is not ideal, but some users operate servers that way.
After profiling to find the cause of the problem, it seems that the connection is disconnected because a lot of time is consumed when rendering the DOM after parsing the json by getting the list of SFTP files. (Please refer to the attached photos.)
//guacFileBrowser.js // Watch directory contents once file template is available $templateRequest('app/client/templates/file.html').then(function fileTemplateRetrieved(html) { // Store file template statically fileTemplate = html; // Update the contents of the file browser whenever the current directory (or its contents) changes $scope.$watch('filesystem.currentDirectory.files', function currentDirectoryChanged(files) { // Clear current content currentDirectoryContents.html(''); // Display all files within current directory, sorted angular.forEach(sortFiles(files), function displayFile(file) { currentDirectoryContents.append(createFileElement(file)); }); }); }, angular.noop); // end retrieve file template
In my opinion, it takes a lot of time to render the DOM. If you use the lazy loading technique, it seems that you can immediately show the list to the user without disconnecting.
Thanks.