Don't re-render markdown cells on initializeWebViewState (#157173)

Fixes #156914

I don't really understand what `initializeWebViewState` is doing here but there are two things:

- I've removed a list of renderers it creates and then never uses
- I've removed the part where it calls back into `initializeMarkup`. This should have already been called during `_warmupViewport`
This commit is contained in:
Matt Bierner 2022-08-05 11:58:54 -07:00 committed by GitHub
parent 0f9323e411
commit a97d84d375
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -929,13 +929,6 @@ var requirejs = (function() {
}
private initializeWebViewState() {
const renderers = new Set<INotebookRendererInfo>();
for (const inset of this.insetMapping.values()) {
if (inset.renderer) {
renderers.add(inset.renderer);
}
}
this._preloadsCache.clear();
if (this._currentKernel) {
this._updatePreloadsFromKernel(this._currentKernel);
@ -945,9 +938,6 @@ var requirejs = (function() {
this._sendMessageToWebview({ ...inset.cachedCreation, initiallyHidden: this.hiddenInsetMapping.has(output) });
}
const mdCells = [...this.markupPreviewMapping.values()];
this.markupPreviewMapping.clear();
this.initializeMarkup(mdCells);
this._updateStyles();
this._updateOptions();
}