src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.ts/NotebookTextDiffEditor/computeDiff
class NotebookTextDiffEditor:	static computeDiff(instantiationService: IInstantiationService, configurationService: IConfigurationService, model: INotebookDiffEditorModel, eventDispatcher: NotebookDiffEditorEventDispatcher, diffResult: INotebookDiffResult) {
		const cellChanges = diffResult.cellsDiff.changes;
		const diffElementViewModels: DiffElementViewModelBase[] = [];
		const originalModel = model.original.notebook;
		const modifiedModel = model.modified.notebook;
		let originalCellIndex = 0;
		let modifiedCellIndex = 0;

		let firstChangeIndex = -1;
		const initData = {
			metadataStatusHeight: configurationService.getValue('notebook.diff.ignoreMetadata') ? 0 : 25,
			outputStatusHeight: configurationService.getValue<boolean>('notebook.diff.ignoreOutputs') || !!(modifiedModel.transientOptions.transientOutputs) ? 0 : 25
		};

		for (let i = 0; i < cellChanges.length; i++) {
			const change = cellChanges[i];
			// common cells

			for (let j = 0; j < change.originalStart - originalCellIndex; j++) {
				const originalCell = originalModel.cells[originalCellIndex + j];
				const modifiedCell = modifiedModel.cells[modifiedCellIndex + j];
				if (originalCell.getHashValue() === modifiedCell.getHashValue()) {
					diffElementViewModels.push(new SideBySideDiffElementViewModel(
						model.modified.notebook,
						model.original.notebook,
						instantiationService.createInstance(DiffNestedCellViewModel, originalCell),
						instantiationService.createInstance(DiffNestedCellViewModel, modifiedCell),
						'unchanged',
						eventDispatcher,
						initData
					));
				} else {
					if (firstChangeIndex === -1) {
						firstChangeIndex = diffElementViewModels.length;
					}

					diffElementViewModels.push(new SideBySideDiffElementViewModel(
						model.modified.notebook,
						model.original.notebook,
						instantiationService.createInstance(DiffNestedCellViewModel, originalCell),
						instantiationService.createInstance(DiffNestedCellViewModel, modifiedCell),
						'modified',
						eventDispatcher!,
						initData
					));
				}
			}

			const modifiedLCS = NotebookTextDiffEditor.computeModifiedLCS(instantiationService, change, originalModel, modifiedModel, eventDispatcher, initData);
			if (modifiedLCS.length && firstChangeIndex === -1) {
				firstChangeIndex = diffElementViewModels.length;
			}

			diffElementViewModels.push(...modifiedLCS);
			originalCellIndex = change.originalStart + change.originalLength;
			modifiedCellIndex = change.modifiedStart + change.modifiedLength;
		}

		for (let i = originalCellIndex; i < originalModel.cells.length; i++) {
			diffElementViewModels.push(new SideBySideDiffElementViewModel(
				model.modified.notebook,
				model.original.notebook,
				instantiationService.createInstance(DiffNestedCellViewModel, originalModel.cells[i]),
				instantiationService.createInstance(DiffNestedCellViewModel, modifiedModel.cells[i - originalCellIndex + modifiedCellIndex]),
				'unchanged',
				eventDispatcher,
				initData
			));
		}

		return {
			viewModels: diffElementViewModels,
			firstChangeIndex
		};
	}