perf - move perf marking into code that is also used by CS

This commit is contained in:
Benjamin Pasero 2020-07-17 08:32:31 +02:00
parent 5abb87f961
commit 27e8b9d1a3
2 changed files with 5 additions and 5 deletions

View file

@ -12,7 +12,6 @@ import { request } from 'vs/base/parts/request/browser/request';
import { isFolderToOpen, isWorkspaceToOpen } from 'vs/platform/windows/common/windows';
import { isEqual } from 'vs/base/common/resources';
import { isStandalone } from 'vs/base/browser/browser';
import { mark } from 'vs/base/common/performance';
interface ICredential {
service: string;
@ -278,10 +277,6 @@ class WorkspaceProvider implements IWorkspaceProvider {
(function () {
// Mark start of workbench
mark('didLoadWorkbenchMain');
performance.mark('workbench-start');
// Find config by checking for DOM
const configElement = document.getElementById('vscode-workbench-web-configuration');
const configElementAttribute = configElement ? configElement.getAttribute('data-settings') : undefined;

View file

@ -18,6 +18,7 @@ import { Disposable, IDisposable } from 'vs/base/common/lifecycle';
import { IWorkspaceProvider, IWorkspace } from 'vs/workbench/services/host/browser/browserHostService';
import { CommandsRegistry } from 'vs/platform/commands/common/commands';
import { IProductConfiguration } from 'vs/platform/product/common/productService';
import { mark } from 'vs/base/common/performance';
interface IResourceUriProvider {
(uri: URI): URI;
@ -359,6 +360,10 @@ let workbenchPromiseResolve: Function;
const workbenchPromise = new Promise<IWorkbench>(resolve => workbenchPromiseResolve = resolve);
async function create(domElement: HTMLElement, options: IWorkbenchConstructionOptions): Promise<void> {
// Mark start of workbench
mark('didLoadWorkbenchMain');
performance.mark('workbench-start');
// Assert that the workbench is not created more than once. We currently
// do not support this and require a full context switch to clean-up.
if (created) {