title: Docslist.find executing very slowly
body: <p>I am using DocsList.find() and everything in my code is working just fine. The only issue is that it can take up to 90 seconds to find a file in the folder specified even when there are only two files in the folder!</p>
  
  <p>I was hoping that someone might be able to suggest a method of speeding up the execution. Or, it may be that I have misunderstood the folder element of DocsList. Any help would be greatly appreciated!</p>
  
  <p>Thanks,</p>
  
  <p>Oli</p>
  
  <p>Sample Code:</p>
  
  <pre><code>function myFunction() {
  var folder = DocsList.getFolderById("MYFOLDERID");
  var lastrow = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Form Responses 1').getLastRow();
  var thissheet = SpreadsheetApp.openById(SpreadsheetApp.getActiveSpreadsheet().getId());
  
  var i = 3;
  while (i&lt;= lastrow)
  if(SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Add scores to sheets').getRange(i,6).getValue() &lt; 1){
  
   var getfile = folder.find(thissheet.getSheetByName('Add scores to sheets').getRange(i,3).getValue())[0].getId();
    var cell = SpreadsheetApp.openById(getfile).getSheetByName('Sheet1').getRange(thissheet.getSheetByName('Add scores to sheets').getRange(i,5).getValue());
  
    if(cell.getValue() &lt; thissheet.getSheetByName('Add scores to sheets').getRange(i,4).getValue()){
    cell.setValue(thissheet.getSheetByName('Add scores to sheets').getRange(i,4).getValue());
    }
  
  
    thissheet.getSheetByName('Add scores to sheets').getRange(i,6).setValue(1);
     i++ 
  }
  
  else {i++}
  
  }
  </code></pre>
  
  <p>The code takes a score form the sheet 'Add scores to sheet', finds the file named in column C (an email address), locates the named range and sets the value providing that the current value is less than the new value. I am a Maths teacher - this is all run from a Google form quiz.</p>