Skip to content

Commit

Permalink
Remove commitRootId from RenderedAt
Browse files Browse the repository at this point in the history
  • Loading branch information
marvinhagemeister committed May 17, 2022
1 parent fd20b2a commit 1172940
Showing 1 changed file with 11 additions and 17 deletions.
28 changes: 11 additions & 17 deletions src/view/components/profiler/components/RenderedAt/RenderedAt.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,18 @@ export function RenderedAt() {
const data = useObserver(() => {
const id = store.profiler.selectedNodeId.$;

return store.profiler.commits.$.filter(x => {
if (x.nodes.has(id)) {
const node = x.nodes.get(id)!;
const root = x.nodes.get(x.commitRootId)!;
return node.startTime >= root.startTime && node.endTime <= root.endTime;
}
return store.profiler.commits.$.filter(x => x.rendered.includes(id)).map(
commit => {
const node = commit.nodes.get(id)!;

return false;
}).map(commit => {
const node = commit.nodes.get(id)!;

const selfDuration = commit.selfDurations.get(id) || 0;
return {
index: store.profiler.commits.$.findIndex(x => x === commit),
startTime: node.startTime,
selfDuration,
};
});
const selfDuration = commit.selfDurations.get(id) || 0;
return {
index: store.profiler.commits.$.findIndex(x => x === commit),
startTime: node.startTime,
selfDuration,
};
},
);
});

const commitIdx = useObserver(() => store.profiler.activeCommitIdx.$);
Expand Down

0 comments on commit 1172940

Please sign in to comment.