kwangheelee created GUACAMOLE-1247:
--------------------------------------
Summary: Failure to get SFTP list when there are many file lists
Key: GUACAMOLE-1247
URL: https://issues.apache.org/jira/browse/GUACAMOLE-1247
Project: Guacamole
Issue Type: Improvement
Components: guacamole-client
Affects Versions: 1.2.0
Reporter: kwangheelee
Attachments: err1.png, err2.png
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.)
{code:java}
// 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{code}
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.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)