80
blockingUpdateTime = now();
81
const newEventTime = resolveEventTimeStamp();
82
const newEventType = resolveEventType();
83
- blockingEventIsRepeat =
84
- newEventTime === blockingEventTime &&
85
- newEventType === blockingEventType;
83
+ if (
84
+ newEventTime !== blockingEventTime ||
85
+ newEventType !== blockingEventType
86
+ ) {
87
+ blockingEventIsRepeat = false;
88
+ }
89
blockingEventTime = newEventTime;
90
blockingEventType = newEventType;
91
}
95
if (transitionStartTime < 0) {
96
const newEventTime = resolveEventTimeStamp();
97
const newEventType = resolveEventType();
95
- transitionEventIsRepeat =
96
- newEventTime === transitionEventTime &&
97
- newEventType === transitionEventType;
98
+ if (
99
+ newEventTime !== transitionEventTime ||
100
+ newEventType !== transitionEventType
101
+ ) {
102
+ transitionEventIsRepeat = false;
103
+ }
104
transitionEventTime = newEventTime;
105
transitionEventType = newEventType;
106
}
108
}
109
}
110
105
-export function markUpdateAsRepeat(lanes: Lanes): void {
106
- if (!enableProfilerTimer || !enableComponentPerformanceTrack) {
107
- return;
108
- }
109
- // We're about to do a retry of this render. It is not a new update, so treat this
110
- // as a repeat within the same event.
111
- if (includesSyncLane(lanes) || includesBlockingLane(lanes)) {
112
- blockingEventIsRepeat = true;
113
- } else if (includesTransitionLane(lanes)) {
114
- transitionEventIsRepeat = true;
115
- }
116
-}
117
-
111
export function trackSuspendedTime(lanes: Lanes, renderEndTime: number) {
112
if (!enableProfilerTimer || !enableComponentPerformanceTrack) {
113
return;
122
export function clearBlockingTimers(): void {
123
blockingUpdateTime = -1.1;
124
blockingSuspendedTime = -1.1;
125
+ blockingEventIsRepeat = true;
126
}
127
128
export function startAsyncTransitionTimer(): void {
133
transitionStartTime = now();
134
const newEventTime = resolveEventTimeStamp();
135
const newEventType = resolveEventType();
142
- transitionEventIsRepeat =
143
- newEventTime === transitionEventTime &&
144
- newEventType === transitionEventType;
136
+ if (
137
+ newEventTime !== transitionEventTime ||
138
+ newEventType !== transitionEventType
139
+ ) {
140
+ transitionEventIsRepeat = false;
141
+ }
142
transitionEventTime = newEventTime;
143
transitionEventType = newEventType;
144
}
170
transitionStartTime = -1.1;
171
transitionUpdateTime = -1.1;
172
transitionSuspendedTime = -1.1;
173
+ transitionEventIsRepeat = true;
174
}
175
176
export function clampBlockingTimers(finalTime: number): void {