src/vs/workbench/contrib/codeEditor/browser/largeFileOptimizations.ts/LargeFileOptimizationsWarner/constructor
class LargeFileOptimizationsWarner:	constructor(
		private readonly _editor: ICodeEditor,
		@INotificationService private readonly _notificationService: INotificationService,
		@IConfigurationService private readonly _configurationService: IConfigurationService,
	) {
		super();

		this._register(this._editor.onDidChangeModel((e) => {
			const model = this._editor.getModel();
			if (!model) {
				return;
			}

			if (model.isTooLargeForTokenization()) {
				const message = nls.localize(
					{
						key: 'largeFile',
						comment: [
							'Variable 0 will be a file name.'
						]
					},
					"{0}: tokenization, wrapping and folding have been turned off for this large file in order to reduce memory usage and avoid freezing or crashing.",
					path.basename(model.uri.path)
				);

				this._notificationService.prompt(Severity.Info, message, [
					{
						label: nls.localize('removeOptimizations', "Forcefully Enable Features"),
						run: () => {
							this._configurationService.updateValue(`editor.largeFileOptimizations`, false).then(() => {
								this._notificationService.info(nls.localize('reopenFilePrompt', "Please reopen file in order for this setting to take effect."));
							}, (err) => {
								this._notificationService.error(err);
							});
						}
					}
				], { neverShowAgain: { id: 'editor.contrib.largeFileOptimizationsWarner' } });
			}
		}));
	}