Skip to content

Commit

Permalink
profiling doc: Remove stale pre-RN v0.63 guidance about performance.now
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbobbe committed Apr 14, 2022
1 parent 5e6d5b5 commit 569a196
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions docs/howto/profiling.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,8 @@ different JS engine from the one RN uses for the actual app.
For either benchmarking, or coarse-grained profiling, a simple
approach by manually adding some timing code can work well.

You can add `Date.now()` to measure times (or better,
`performance.now()` once we're on RN v0.63+; see our #4245), and
`console.log()` to print the results.
You can add `performance.now()` to measure times, and `console.log()` to
print the results.

See our [debugging guide](debugging.md#native) for how to view the
output of `console.log`. (As discussed above, you don't want to be
Expand All @@ -59,10 +58,9 @@ fine-grained exploration of the call graph: trying to run
down and altering the results, and adding logging too voluminously
would also just be a lot of manual work.

Another limitation is that `Date.now()` provides times only to the
nearest millisecond, so this can only measure relatively large chunks
of time. This one will go away when we upgrade to RN v0.63 (#4245)
and can use `performance.now()` for finer resolution.
Note: `Date.now()` provides times only to the nearest millisecond, so this
can only measure relatively large chunks of time. Use `performance.now()`
for finer resolution.


## Chrome DevTools
Expand Down

0 comments on commit 569a196

Please sign in to comment.