src/vs/workbench/contrib/mergeEditor/browser/model/textModelDiffs.ts/TextModelDiffs/recompute
class TextModelDiffs:	private recompute(reader: IReader): void {
		this.recomputeCount++;
		const currentRecomputeIdx = this.recomputeCount;

		if (this._state.get() === TextModelDiffState.initializing) {
			this.isInitializing = true;
		}

		transaction(tx => {
			/** @description Starting Diff Computation. */
			this._state.set(
				this.isInitializing ? TextModelDiffState.initializing : TextModelDiffState.updating,
				tx,
				TextModelDiffChangeReason.other
			);
		});

		const result = this.diffComputer.computeDiff(this.baseTextModel, this.textModel, reader);

		result.then((result) => {
			if (this.isDisposed) {
				return;
			}

			if (currentRecomputeIdx !== this.recomputeCount) {
				// There is a newer recompute call
				return;
			}

			transaction(tx => {
				/** @description Completed Diff Computation */
				if (result.diffs) {
					this._state.set(TextModelDiffState.upToDate, tx, TextModelDiffChangeReason.textChange);
					this._diffs.set(result.diffs, tx, TextModelDiffChangeReason.textChange);
				} else {
					this._state.set(TextModelDiffState.error, tx, TextModelDiffChangeReason.textChange);
				}
				this.isInitializing = false;
			});
		});
	}