From e5094daf8cfb74a515cfc1bfb9087cf8d2e18c08 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 28 Nov 2018 15:34:02 +0100 Subject: [PATCH] don't resort extensions after profiling --- .../runtimeExtensionsEditor.ts | 26 ++++++++----------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.ts b/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.ts index 4227a53a04d..9903bb630f8 100644 --- a/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.ts +++ b/src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.ts @@ -219,21 +219,17 @@ export class RuntimeExtensionsEditor extends BaseEditor { }; } - result = result.filter((element) => element.status.activationTimes); - - if (this._profileInfo) { - // sort descending by time spent in the profiler - result = result.sort((a, b) => { - if (a.unresponsiveProfile === this._profileInfo && !b.unresponsiveProfile) { - return -1; - } else if (!a.unresponsiveProfile && b.unresponsiveProfile === this._profileInfo) { - return 1; - } else if (a.profileInfo.totalTime === b.profileInfo.totalTime) { - return a.originalIndex - b.originalIndex; - } - return b.profileInfo.totalTime - a.profileInfo.totalTime; - }); - } + result = result.filter(element => element.status.activationTimes); + + // bubble up extensions that have caused slowness + result = result.sort((a, b) => { + if (a.unresponsiveProfile === this._profileInfo && !b.unresponsiveProfile) { + return -1; + } else if (!a.unresponsiveProfile && b.unresponsiveProfile === this._profileInfo) { + return 1; + } + return a.originalIndex - b.originalIndex; + }); return result; } -- GitLab