Skip to content

[Fiber] Performance measurements #9071

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 42 commits into from
Mar 8, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
845eda9
wip
gaearon Feb 28, 2017
ad3d5b8
better
gaearon Feb 28, 2017
8dce4b0
better
gaearon Feb 28, 2017
cc2794d
track commits
gaearon Feb 28, 2017
0adf8ac
better
gaearon Feb 28, 2017
b4702f9
wip
gaearon Mar 1, 2017
ac0965a
Fix
gaearon Mar 2, 2017
8d0405f
Add some lifecycles
gaearon Mar 2, 2017
1095430
wip
gaearon Mar 2, 2017
4cbbca1
Naming
gaearon Mar 2, 2017
dede546
Moar emojis
gaearon Mar 2, 2017
5e267e1
Remove stacks in favor of a flag
gaearon Mar 2, 2017
4d77afe
Fix Flow
gaearon Mar 3, 2017
43c3cc8
merge master
gaearon Mar 3, 2017
cc141e4
Gate behind __DEV__
gaearon Mar 3, 2017
cd41cb9
Revert flag for testing
gaearon Mar 3, 2017
094b9f9
Measure all lifecycles
gaearon Mar 3, 2017
8abea2f
Push it to the limits
gaearon Mar 3, 2017
50dd084
Polish
gaearon Mar 3, 2017
456e1f8
Indent
gaearon Mar 3, 2017
68abb8e
Refactor and track cascading updates
gaearon Mar 3, 2017
23f70ec
More prominent warnings
gaearon Mar 3, 2017
a6e2d72
Make mark names themselves readable
gaearon Mar 3, 2017
d4df2b7
Keep track of how many effects we call
gaearon Mar 3, 2017
97ecc05
Merge remote-tracking branch 'origin/master' into wip-perf
gaearon Mar 3, 2017
c97f53e
Fix typo
gaearon Mar 3, 2017
2039f01
Do less work to reduce the overhead
gaearon Mar 4, 2017
1708e37
Merge with master
gaearon Mar 4, 2017
c227062
Merge branch 'master' into wip-perf
gaearon Mar 6, 2017
f5b77e5
Fix lint
gaearon Mar 7, 2017
f2304df
Remove closure
gaearon Mar 7, 2017
70d25c6
Remove unintentional formatting changes
gaearon Mar 7, 2017
cd26fee
Add tests
gaearon Mar 7, 2017
b43f3ad
Merge branch 'master' into wip-perf
gaearon Mar 8, 2017
a2f9496
Fix test regex and record tests
gaearon Mar 8, 2017
491f6aa
Disable irrelevant tests needed for ReactPerf
gaearon Mar 8, 2017
0f76386
Fix typo
gaearon Mar 8, 2017
2202fc0
Fix lint and flow
gaearon Mar 8, 2017
cc001d3
Don't treat cWM or cWRP as cascading
gaearon Mar 8, 2017
d923816
Whitespace
gaearon Mar 8, 2017
65e3b1e
Update tests
gaearon Mar 8, 2017
21269e9
Gate callComponentWillUnmountWithTimerInDev definition by DEV
gaearon Mar 8, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
"./scripts/jest/environment.js"
],
"setupTestFrameworkScriptFile": "./scripts/jest/test-framework-setup.js",
"testRegex": "/__tests__/",
"testRegex": "/__tests__/.*(\\.js|coffee|ts)$",
"moduleFileExtensions": [
"js",
"json",
Expand Down
15 changes: 0 additions & 15 deletions scripts/fiber/tests-failing.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,6 @@
src/isomorphic/classic/__tests__/ReactContextValidator-test.js
* should pass previous context to lifecycles

src/renderers/__tests__/ReactComponentTreeHook-test.js
* can be retrieved by ID

src/renderers/__tests__/ReactHostOperationHistoryHook-test.js
* gets recorded during an update

src/renderers/__tests__/ReactPerf-test.js
* should count no-op update as waste
* should count no-op update in child as waste
* should include stats for components unmounted during measurement
* should include lifecycle methods in measurements
* should include render time of functional components
* should not count time in a portal towards lifecycle method
* should work when measurement starts during reconciliation

src/renderers/dom/shared/__tests__/ReactDOMComponent-test.js
* gives source code refs for unknown prop warning (ssr)
* gives source code refs for unknown prop warning for exact elements (ssr)
Expand Down
129 changes: 0 additions & 129 deletions scripts/fiber/tests-passing-except-dev.txt
Original file line number Diff line number Diff line change
@@ -1,132 +1,3 @@
src/renderers/__tests__/ReactComponentTreeHook-test.js
* uses displayName or Unknown for classic components
* uses displayName, name, or ReactComponent for modern components
* uses displayName, name, or Object for factory components
* uses displayName, name, or StatelessComponent for functional components
* reports a host tree correctly
* reports a simple tree with composites correctly
* reports a tree with composites correctly
* ignores null children
* ignores false children
* reports text nodes as children
* reports a single text node as a child
* reports a single number node as a child
* reports a zero as a child
* skips empty nodes for multiple children
* reports html content as no children
* updates text of a single text child
* updates from no children to a single text child
* updates from a single text child to no children
* updates from html content to a single text child
* updates from a single text child to html content
* updates from no children to multiple text children
* updates from multiple text children to no children
* updates from html content to multiple text children
* updates from multiple text children to html content
* updates from html content to no children
* updates from no children to html content
* updates from one text child to multiple text children
* updates from multiple text children to one text child
* updates text nodes when reordering
* updates host nodes when reordering with keys
* updates host nodes when reordering without keys
* updates a single composite child of a different type
* updates a single composite child of the same type
* updates from no children to a single composite child
* updates from a single composite child to no children
* updates mixed children
* updates with a host child
* updates from null to a host child
* updates from a host child to null
* updates from a host child to a composite child
* updates from a composite child to a host child
* updates from null to a composite child
* updates from a composite child to null
* updates with a host child
* updates from null to a host child
* updates from a host child to null
* updates from a host child to a composite child
* updates from a composite child to a host child
* updates from null to a composite child
* updates from a composite child to null
* tracks owner correctly
* purges unmounted components automatically
* reports update counts
* does not report top-level wrapper as a root
* registers inlined text nodes
* works

src/renderers/__tests__/ReactComponentTreeHook-test.native.js
* uses displayName or Unknown for classic components
* uses displayName, name, or ReactComponent for modern components
* uses displayName, name, or Object for factory components
* uses displayName, name, or StatelessComponent for functional components
* reports a host tree correctly
* reports a simple tree with composites correctly
* reports a tree with composites correctly
* ignores null children
* ignores false children
* reports text nodes as children
* reports a single text node as a child
* reports a single number node as a child
* reports a zero as a child
* skips empty nodes for multiple children
* updates text of a single text child
* updates from no children to a single text child
* updates from a single text child to no children
* updates from no children to multiple text children
* updates from multiple text children to no children
* updates from one text child to multiple text children
* updates from multiple text children to one text child
* updates text nodes when reordering
* updates host nodes when reordering with keys
* updates host nodes when reordering with keys
* updates a single composite child of a different type
* updates a single composite child of the same type
* updates from no children to a single composite child
* updates from a single composite child to no children
* updates mixed children
* updates with a host child
* updates from null to a host child
* updates from a host child to null
* updates from a host child to a composite child
* updates from a composite child to a host child
* updates from null to a composite child
* updates from a composite child to null
* updates with a host child
* updates from null to a host child
* updates from a host child to null
* updates from a host child to a composite child
* updates from a composite child to a host child
* updates from null to a composite child
* updates from a composite child to null
* tracks owner correctly
* purges unmounted components automatically
* reports update counts
* does not report top-level wrapper as a root

src/renderers/__tests__/ReactHostOperationHistoryHook-test.js
* gets recorded for host roots
* gets recorded for composite roots
* gets recorded when a native is mounted deeply instead of null
* gets recorded during mount
* gets recorded during an update
* gets ignored if the styles are shallowly equal
* gets recorded during mount
* gets recorded during mount
* gets recorded during mount
* gets recorded during an update from text content
* gets recorded during an update from html
* gets recorded during an update from children
* gets recorded when composite renders to a different type
* gets recorded when composite renders to null after a native
* gets recorded during an update from text content
* gets recorded during an update from html
* gets recorded during an update from children
* gets reported when a child is inserted
* gets reported when a child is inserted
* gets reported when a child is removed

src/renderers/dom/shared/__tests__/ReactDOMComponent-test.js
* should not warn when server-side rendering `onScroll`
* should warn about incorrect casing on properties (ssr)
Expand Down
55 changes: 15 additions & 40 deletions scripts/fiber/tests-passing.txt
Original file line number Diff line number Diff line change
Expand Up @@ -561,8 +561,6 @@ src/renderers/__tests__/ReactComponentLifeCycle-test.js

src/renderers/__tests__/ReactComponentTreeHook-test.js
* gets created
* is created during mounting
* is created when calling renderToString during render

src/renderers/__tests__/ReactCompositeComponent-test.js
* should support module pattern components
Expand Down Expand Up @@ -673,17 +671,6 @@ src/renderers/__tests__/ReactErrorBoundaries-test.js
* renders empty output if error boundary does not handle the error
* passes first error when two errors happen in commit

src/renderers/__tests__/ReactHostOperationHistoryHook-test.js
* gets ignored for composite roots that return null
* gets recorded during an update
* gets recorded as a removal during an update
* gets recorded during an update
* gets recorded during an update
* gets ignored if new text is equal
* gets ignored if new text is equal
* gets ignored if the type has not changed
* gets ignored if new html is equal

src/renderers/__tests__/ReactIdentity-test.js
* should allow key property to express identity
* should use composite identity
Expand Down Expand Up @@ -750,33 +737,6 @@ src/renderers/__tests__/ReactMultiChildText-test.js
* should throw if rendering both HTML and children
* should render between nested components and inline children

src/renderers/__tests__/ReactPerf-test.js
* should not count initial render as waste
* should not count unmount as waste
* should not count content update as waste
* should not count child addition as waste
* should not count child removal as waste
* should not count property update as waste
* should not count style update as waste
* should not count property removal as waste
* should not count raw HTML update as waste
* should not count child reordering as waste
* should not count text update as waste
* should not count replacing null with a host as waste
* should not count replacing a host with null as waste
* warns once when using getMeasurementsSummaryMap
* warns once when using printDOM
* returns isRunning state
* start has no effect when already running
* stop has no effect when already stopped
* should print console error only once
* should not print errant warnings if render() throws
* should not print errant warnings if componentWillMount() throws
* should not print errant warnings if componentDidMount() throws
* should not print errant warnings if portal throws in render()
* should not print errant warnings if portal throws in componentWillMount()
* should not print errant warnings if portal throws in componentDidMount()

src/renderers/__tests__/ReactStatelessComponent-test.js
* should render stateless component
* should update stateless component
Expand Down Expand Up @@ -1565,6 +1525,21 @@ src/renderers/shared/fiber/__tests__/ReactIncrementalErrorHandling-test.js
* should ignore errors thrown in log method to prevent cycle
* should relay info about error boundary and retry attempts if applicable

src/renderers/shared/fiber/__tests__/ReactIncrementalPerf-test.js
* measures a simple reconciliation
* skips parents during setState
* warns on cascading renders from setState
* warns on cascading renders from top-level render
* does not treat setState from cWM or cWRP as cascading
* captures all lifecycles
* measures deprioritized work
* measures deferred work in chunks
* recovers from fatal errors
* recovers from caught errors
* deduplicates lifecycle names during commit to reduce overhead
* supports coroutines
* supports portals

src/renderers/shared/fiber/__tests__/ReactIncrementalReflection-test.js
* handles isMounted even when the initial render is deferred
* handles isMounted when an unmount is deferred
Expand Down
Loading