提交 e5094daf 编写于 作者: J Johannes Rieken

don't resort extensions after profiling

上级 37037eac
...@@ -219,21 +219,17 @@ export class RuntimeExtensionsEditor extends BaseEditor { ...@@ -219,21 +219,17 @@ export class RuntimeExtensionsEditor extends BaseEditor {
}; };
} }
result = result.filter((element) => element.status.activationTimes); result = result.filter(element => element.status.activationTimes);
if (this._profileInfo) { // bubble up extensions that have caused slowness
// sort descending by time spent in the profiler result = result.sort((a, b) => {
result = result.sort((a, b) => { if (a.unresponsiveProfile === this._profileInfo && !b.unresponsiveProfile) {
if (a.unresponsiveProfile === this._profileInfo && !b.unresponsiveProfile) { return -1;
return -1; } else if (!a.unresponsiveProfile && b.unresponsiveProfile === this._profileInfo) {
} else if (!a.unresponsiveProfile && b.unresponsiveProfile === this._profileInfo) { return 1;
return 1; }
} else if (a.profileInfo.totalTime === b.profileInfo.totalTime) { return a.originalIndex - b.originalIndex;
return a.originalIndex - b.originalIndex; });
}
return b.profileInfo.totalTime - a.profileInfo.totalTime;
});
}
return result; return result;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册