Skip to content

Conversation

@hoxyq
Copy link
Contributor

@hoxyq hoxyq commented Jul 16, 2025

This fixes displaying incorrect component render entries on a timeline, when we are reconnecting passive effects.

Before

1

The cloned nodes will persist original actualStartTime, when these were first mounted. When we "replay", the end time will be "now" or whatever the actual start time of the sibling. Depending on when this is being recorded, the diff between end and start could be tens of seconds and doesn't represent what React was doing.

We shouldn't log these entries at all.

After

We are only logging newly finished renders, but could potentially loose renders that never commit.

@hoxyq hoxyq changed the title fix: log passive effects for only newly finished work fix: log renders from passive effects for only newly finished work Jul 16, 2025
@hoxyq hoxyq merged commit 9fec565 into facebook:main Jul 16, 2025
247 of 248 checks passed
@hoxyq hoxyq deleted the perf-tracks/dont-log-cloned branch July 16, 2025 17:09
github-actions bot pushed a commit that referenced this pull request Jul 16, 2025
…33797)

This fixes displaying incorrect component render entries on a timeline,
when we are reconnecting passive effects.

### Before
<img width="2318" height="1127" alt="1"
src="https://github.com/user-attachments/assets/9b6b2824-d2de-43a3-8615-2c45d67c3668"
/>

The cloned nodes will persist original `actualStartTime`, when these
were first mounted. When we "replay", the end time will be "now" or
whatever the actual start time of the sibling. Depending on when this is
being recorded, the diff between end and start could be tens of seconds
and doesn't represent what React was doing.

We shouldn't log these entries at all.

### After
We are only logging newly finished renders, but could potentially loose
renders that never commit.

DiffTrain build for [9fec565](9fec565)
github-actions bot pushed a commit that referenced this pull request Jul 16, 2025
…33797)

This fixes displaying incorrect component render entries on a timeline,
when we are reconnecting passive effects.

### Before
<img width="2318" height="1127" alt="1"
src="https://github.com/user-attachments/assets/9b6b2824-d2de-43a3-8615-2c45d67c3668"
/>

The cloned nodes will persist original `actualStartTime`, when these
were first mounted. When we "replay", the end time will be "now" or
whatever the actual start time of the sibling. Depending on when this is
being recorded, the diff between end and start could be tens of seconds
and doesn't represent what React was doing.

We shouldn't log these entries at all.

### After
We are only logging newly finished renders, but could potentially loose
renders that never commit.

DiffTrain build for [9fec565](9fec565)
github-actions bot pushed a commit to code/lib-react that referenced this pull request Jul 20, 2025
…acebook#33797)

This fixes displaying incorrect component render entries on a timeline,
when we are reconnecting passive effects.

### Before
<img width="2318" height="1127" alt="1"
src="https://github.com/user-attachments/assets/9b6b2824-d2de-43a3-8615-2c45d67c3668"
/>

The cloned nodes will persist original `actualStartTime`, when these
were first mounted. When we "replay", the end time will be "now" or
whatever the actual start time of the sibling. Depending on when this is
being recorded, the diff between end and start could be tens of seconds
and doesn't represent what React was doing.

We shouldn't log these entries at all.

### After
We are only logging newly finished renders, but could potentially loose
renders that never commit.

DiffTrain build for [9fec565](facebook@9fec565)
github-actions bot pushed a commit to code/lib-react that referenced this pull request Jul 20, 2025
…acebook#33797)

This fixes displaying incorrect component render entries on a timeline,
when we are reconnecting passive effects.

### Before
<img width="2318" height="1127" alt="1"
src="https://github.com/user-attachments/assets/9b6b2824-d2de-43a3-8615-2c45d67c3668"
/>

The cloned nodes will persist original `actualStartTime`, when these
were first mounted. When we "replay", the end time will be "now" or
whatever the actual start time of the sibling. Depending on when this is
being recorded, the diff between end and start could be tens of seconds
and doesn't represent what React was doing.

We shouldn't log these entries at all.

### After
We are only logging newly finished renders, but could potentially loose
renders that never commit.

DiffTrain build for [9fec565](facebook@9fec565)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants