Skip to content

Commit 2bb744b

Browse files
authored
Fix a logic error (#392)
1 parent 6df072a commit 2bb744b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/scan/src/web/views/notifications/optimize.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export const generateInteractionDataPrompt = ({
7676
- things like prepaint, style recalculations, layerization, async web API's like observers may occur during this time
7777
- how long it took from the last request animation frame to when the dom was committed: ${commitTime.toFixed(0)}ms
7878
- during this period you will see paint, commit, potential style recalcs, and other misc browser activity. Frequently high times here imply css that makes the browser do a lot of work, or mutating expensive dom properties during the event handler stage. This can be many things, but it narrows the problem scope significantly when this is high
79-
${framePresentTime && `- how long it took from dom commit for the frame to be presented: ${framePresentTime.toFixed(0)}ms. This is when information about how to paint the next frame is sent to the compositor threads, and when the GPU does work. If this is high, look for issues that may be a bottleneck for operations occurring during this time`}
79+
${framePresentTime === null ? '' : `- how long it took from dom commit for the frame to be presented: ${framePresentTime.toFixed(0)}ms. This is when information about how to paint the next frame is sent to the compositor threads, and when the GPU does work. If this is high, look for issues that may be a bottleneck for operations occurring during this time`}
8080
8181
### Low level
8282
We also have lower level information about react components, such as their render time, and which props/state/context changed when they re-rendered.
@@ -140,7 +140,7 @@ We also provide you with a breakdown of what the browser spent time on during th
140140
- things like prepaint, style recalculations, layerization, async web API's like observers may occur during this time
141141
- how long it took from the last request animation frame to when the dom was committed: ${commitTime.toFixed(0)}ms
142142
- during this period you will see paint, commit, potential style recalcs, and other misc browser activity. Frequently high times here imply css that makes the browser do a lot of work, or mutating expensive dom properties during the event handler stage. This can be many things, but it narrows the problem scope significantly when this is high
143-
${framePresentTime && `- how long it took from dom commit for the frame to be presented: ${framePresentTime.toFixed(0)}ms. This is when information about how to paint the next frame is sent to the compositor threads, and when the GPU does work. If this is high, look for issues that may be a bottleneck for operations occurring during this time`}
143+
${framePresentTime === null ? '' : `- how long it took from dom commit for the frame to be presented: ${framePresentTime.toFixed(0)}ms. This is when information about how to paint the next frame is sent to the compositor threads, and when the GPU does work. If this is high, look for issues that may be a bottleneck for operations occurring during this time`}
144144
145145
146146
We also have lower level information about react components, such as their render time, and which props/state/context changed when they re-rendered.
@@ -305,7 +305,7 @@ We also provide you with a breakdown of what the browser spent time on during th
305305
- things like prepaint, style recalculations, layerization, async web API's like observers may occur during this time
306306
- how long it took from the last request animation frame to when the dom was committed: ${commitTime.toFixed(0)}ms
307307
- during this period you will see paint, commit, potential style recalcs, and other misc browser activity. Frequently high times here imply css that makes the browser do a lot of work, or mutating expensive dom properties during the event handler stage. This can be many things, but it narrows the problem scope significantly when this is high
308-
${framePresentTime && `- how long it took from dom commit for the frame to be presented: ${framePresentTime.toFixed(0)}ms. This is when information about how to paint the next frame is sent to the compositor threads, and when the GPU does work. If this is high, look for issues that may be a bottleneck for operations occurring during this time`}
308+
${framePresentTime === null ? '' : `- how long it took from dom commit for the frame to be presented: ${framePresentTime.toFixed(0)}ms. This is when information about how to paint the next frame is sent to the compositor threads, and when the GPU does work. If this is high, look for issues that may be a bottleneck for operations occurring during this time`}
309309
310310
We also have lower level information about react components, such as their render time, and which props/state/context changed when they re-rendered.
311311

0 commit comments

Comments
 (0)