Skip to content

Commit

Permalink
Fix performance issue in react-devtools when highlight enabled (#18498)
Browse files Browse the repository at this point in the history
* Fix performance issue in react-devtools when highlight enabled

* getting minimum expiration time (fix)
  • Loading branch information
Faelivrinx authored Apr 6, 2020
1 parent fe2cb52 commit c781156
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,9 @@ function prepareToDraw(): void {

draw(nodeToData);

redrawTimeoutID = setTimeout(prepareToDraw, earliestExpiration - now);
if (earliestExpiration !== Number.MAX_VALUE) {
redrawTimeoutID = setTimeout(prepareToDraw, earliestExpiration - now);
}
}

function measureNode(node: Object): Rect | null {
Expand Down

0 comments on commit c781156

Please sign in to comment.