Revert "Merge pull request #131592 from DonJayamanne/revertPerfFixes2"

This reverts commit 52baabff07, reversing
changes made to 6e930fb6d4.
This commit is contained in:
Don Jayamanne
2021-08-24 17:16:44 -07:00
parent 52baabff07
commit 31abc3784e
4 changed files with 258 additions and 22 deletions
+2 -2
View File
@@ -40,8 +40,8 @@ export class NotebookSerializer implements vscode.NotebookSerializer {
}
}
// Then compute indent from the contents
const indentAmount = contents ? detectIndent(contents).indent : ' ';
// Then compute indent from the contents (only use first 1K characters as a perf optimization)
const indentAmount = contents ? detectIndent(contents.substring(0, 1_000)).indent : ' ';
const preferredCellLanguage = getPreferredLanguage(json.metadata);
// Ensure we always have a blank cell.