File tree Expand file tree Collapse file tree 1 file changed +11
-17
lines changed
src/view/components/profiler/components/RenderedAt Expand file tree Collapse file tree 1 file changed +11
-17
lines changed Original file line number Diff line number Diff line change @@ -9,24 +9,18 @@ export function RenderedAt() {
9
9
const data = useObserver ( ( ) => {
10
10
const id = store . profiler . selectedNodeId . $ ;
11
11
12
- return store . profiler . commits . $ . filter ( x => {
13
- if ( x . nodes . has ( id ) ) {
14
- const node = x . nodes . get ( id ) ! ;
15
- const root = x . nodes . get ( x . commitRootId ) ! ;
16
- return node . startTime >= root . startTime && node . endTime <= root . endTime ;
17
- }
12
+ return store . profiler . commits . $ . filter ( x => x . rendered . includes ( id ) ) . map (
13
+ commit => {
14
+ const node = commit . nodes . get ( id ) ! ;
18
15
19
- return false ;
20
- } ) . map ( commit => {
21
- const node = commit . nodes . get ( id ) ! ;
22
-
23
- const selfDuration = commit . selfDurations . get ( id ) || 0 ;
24
- return {
25
- index : store . profiler . commits . $ . findIndex ( x => x === commit ) ,
26
- startTime : node . startTime ,
27
- selfDuration,
28
- } ;
29
- } ) ;
16
+ const selfDuration = commit . selfDurations . get ( id ) || 0 ;
17
+ return {
18
+ index : store . profiler . commits . $ . findIndex ( x => x === commit ) ,
19
+ startTime : node . startTime ,
20
+ selfDuration,
21
+ } ;
22
+ } ,
23
+ ) ;
30
24
} ) ;
31
25
32
26
const commitIdx = useObserver ( ( ) => store . profiler . activeCommitIdx . $ ) ;
You can’t perform that action at this time.
0 commit comments