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

don't resort extensions after profiling

上级 37037eac
......@@ -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) {
// sort descending by time spent in the profiler
// 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;
} else if (a.profileInfo.totalTime === b.profileInfo.totalTime) {
return a.originalIndex - b.originalIndex;
}
return b.profileInfo.totalTime - a.profileInfo.totalTime;
return a.originalIndex - b.originalIndex;
});
}
return result;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册