Skip to content

Conversation

@acdlite
Copy link
Collaborator

@acdlite acdlite commented Oct 3, 2019

The performance.now returns a timestamp in milliseconds as a float. The browser has the option to adjust the precision of the float, but it's usually more precise than a millisecond. However, this precision is lost when the timestamp is logged by the Scheduler profiler, because we store the numbers in an Int32Array.

This change multiplies the millisecond float value by 1000, giving us three more degrees of precision.

The `performance.now` returns a timestamp in milliseconds as a float.
The browser has the option to adjust the precision of the float, but
it's usually more precise than a millisecond. However, this precision
is lost when the timestamp is logged by the Scheduler profiler, because
we store the numbers in an Int32Array.

This change multiplies the millisecond float value by 1000, giving us
three more degrees of precision.
@sizebot
Copy link

sizebot commented Oct 3, 2019

React: size: 0.0%, gzip: 0.0%

Details of bundled changes.

Comparing: a8b8ffb...3d045a8

react

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react.development.js +0.2% +0.3% 117.67 KB 117.89 KB 29.87 KB 29.96 KB UMD_DEV
react.production.min.js 0.0% 0.0% 12.43 KB 12.43 KB 4.9 KB 4.9 KB UMD_PROD
react.profiling.min.js 0.0% 0.0% 15.94 KB 15.94 KB 5.99 KB 5.99 KB UMD_PROFILING
react.development.js 0.0% 0.0% 72.99 KB 72.99 KB 19.18 KB 19.18 KB NODE_DEV
react.production.min.js 0.0% 0.0% 6.69 KB 6.69 KB 2.78 KB 2.78 KB NODE_PROD
React-dev.js 0.0% 0.0% 70.55 KB 70.55 KB 18.19 KB 18.19 KB FB_WWW_DEV

scheduler

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
scheduler-unstable_mock.development.js +1.0% +2.1% 22.44 KB 22.66 KB 5.28 KB 5.39 KB UMD_DEV
scheduler-tracing.profiling.min.js 0.0% +0.2% 3.25 KB 3.25 KB 991 B 993 B NODE_PROFILING
Scheduler-dev.js +0.7% +1.3% 30.04 KB 30.26 KB 7.67 KB 7.77 KB FB_WWW_DEV
Scheduler-profiling.js +0.8% +0.7% 17.06 KB 17.19 KB 3.93 KB 3.96 KB FB_WWW_PROFILING
scheduler-tracing.development.js 0.0% 0.0% 11.55 KB 11.55 KB 2.95 KB 2.95 KB NODE_DEV
scheduler-tracing.production.min.js 0.0% 🔺+0.8% 728 B 728 B 380 B 383 B NODE_PROD
scheduler-unstable_mock.development.js +1.0% +2.2% 22.25 KB 22.47 KB 5.22 KB 5.33 KB NODE_DEV
SchedulerMock-dev.js +1.0% +2.1% 22.67 KB 22.89 KB 5.31 KB 5.42 KB FB_WWW_DEV
scheduler.development.js +0.7% +1.3% 29.49 KB 29.71 KB 7.57 KB 7.67 KB NODE_DEV

Generated by 🚫 dangerJS against 3d045a8

@acdlite acdlite merged commit cd1b167 into facebook:master Oct 7, 2019
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.

4 participants