diff options
| author | John MacFarlane <jgm@berkeley.edu> | 2015-01-10 21:39:06 -0800 | 
|---|---|---|
| committer | John MacFarlane <jgm@berkeley.edu> | 2015-01-10 21:39:06 -0800 | 
| commit | 3bb150e5e689a6e58d485f2b87c15e38ccf50ae7 (patch) | |
| tree | 7913d296b3033187701bc9c0896b33a98c53d235 /js | |
| parent | 958505853ebd24fd3c0dc2bc6f6fb0615a48c8b7 (diff) | |
Timings:  added 'preparing input'.
Diffstat (limited to 'js')
| -rw-r--r-- | js/lib/blocks.js | 4 | 
1 files changed, 3 insertions, 1 deletions
diff --git a/js/lib/blocks.js b/js/lib/blocks.js index c2d14d7..b1f69eb 100644 --- a/js/lib/blocks.js +++ b/js/lib/blocks.js @@ -671,16 +671,18 @@ var Document = function() {  // The main parsing function.  Returns a parsed document AST.  var parse = function(input) {      "use strict"; -    if (this.options.time) { console.time("block parsing"); }      this.doc = Document();      this.tip = this.doc;      this.refmap = {}; +    if (this.options.time) { console.time("preparing input"); }      var lines = input.split(reLineEnding);      var len = lines.length;      if (input.charCodeAt(input.length - 1) === C_NEWLINE) {          // ignore last blank line created by final newline          len -= 1;      } +    if (this.options.time) { console.timeEnd("preparing input"); } +    if (this.options.time) { console.time("block parsing"); }      for (var i = 0; i < len; i++) {          this.incorporateLine(lines[i], i + 1);      }  | 
