title: Faster way to find the first empty row in a Google Sheet column
body: <p>I've made a script that every few hours adds a new row to a Google Apps spreadsheet.</p>
  
  <p>This is the function I've made to find the first empty row:</p>
  
  <pre class="lang-js prettyprint-override"><code>function getFirstEmptyRow() {
    var spr = SpreadsheetApp.getActiveSpreadsheet();
    var cell = spr.getRange('a1');
    var ct = 0;
    while ( cell.offset(ct, 0).getValue() != "" ) {
      ct++;
    }
    return (ct);
  }
  </code></pre>
  
  <p>It works fine, but when reaching about 100 rows, it gets really slow, even ten seconds.
  I'm worried that when reaching thousands of rows, it will be too slow, maybe going in timeout or worse.
  Is there a better way?</p>