Uploaded image for project: 'Guacamole'
  1. Guacamole
  2. GUACAMOLE-1247

Failure to get SFTP list when there are many file lists

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 1.2.0
    • None
    • guacamole-client
    • 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.

      Attachments

        1. err2.png
          69 kB
          kwangheelee
        2. err1.png
          48 kB
          kwangheelee

        Activity

          People

            Unassigned Unassigned
            kwanghee83.lee kwangheelee
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: