提交 9f66a731 编写于 作者: A Alex Dima

Warm up font info cache before creating lots of dom elements

上级 c09fd454
......@@ -42,6 +42,10 @@ class CSSBasedConfigurationCache {
}
}
export function readFontInfo(bareFontInfo: BareFontInfo): FontInfo {
return CSSBasedConfiguration.INSTANCE.readConfiguration(bareFontInfo);
}
class CSSBasedConfiguration extends Disposable {
public static INSTANCE = new CSSBasedConfiguration();
......
......@@ -93,6 +93,8 @@ import { ITimerService } from 'vs/workbench/services/timer/common/timerService';
import { remote } from 'electron';
import { ITextMateService } from 'vs/editor/node/textMate/textMateService';
import { MainProcessTextMateSyntax } from 'vs/editor/electron-browser/textMate/TMSyntax';
import { BareFontInfo } from 'vs/editor/common/config/fontInfo';
import { readFontInfo } from 'vs/editor/browser/config/configuration';
import 'vs/platform/opener/browser/opener.contribution';
/**
......@@ -382,6 +384,9 @@ export class WorkbenchShell {
this.onUnexpectedError(error);
});
// Warm up font cache information before building up too many dom elements
readFontInfo(BareFontInfo.createFromRawSettings(this.configurationService.getConfiguration('editor')));
// Shell Class for CSS Scoping
$(this.container).addClass('monaco-shell');
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册