-
Notifications
You must be signed in to change notification settings - Fork 47.2k
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
[Fizz] Expose maxBoundarySize as an option #21029
Conversation
Comparing: 154b852...0fa77e1 Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: Expand to show
|
This applies to content only, right? E.g. if fallback is longer we still have to emit it. So the size is not really of the boundary itself but its primary content. Is that right? |
How about |
The implementation is not really correct now because it's shallow. So if you include many small boundaries, it will never break it up. My original heuristic measured the parent instead but had to abandon that for some reason. I think the real heuristic needs to be an accumulation that includes previous siblings. So that it writes until the next boundary would exceed the threshold. Similarly a SuspenseList should stop at some point even if it only has small boundaries for each item. So it's really about the parent boundary's max size at that point. It won't be exactly capped below that number but roughly. I suspect this option might change implementation details given the various ways it's possible to do this so I wouldn't over focus on the exact details. The number indicates roughly how much HTML you can transfer, layout and render in a meaningful window (likely 500ms since that's what the train model uses). If it's smaller than that you'd show the result quicker than the train model would allow. So it really is mostly for giant documents like long Wikipedia entries or something. |
1e8ad31
to
286b35f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like it's hard to name until we know more precisely how we end up using it.
I added a qualified guess for the initial default value to try. We'll need to get more data on this from non-FB sources.
|
RFC: |
Like |
* Expose maxBoundarySize as an option * Adjust the heuristic * Rename to progressiveChunkSize
Summary: This sync includes the following changes: - **[6d3ecb70d](facebook/react@6d3ecb70d )**: Remove unstable_changedBits ([#20953](facebook/react#20953)) //<Andrew Clark>// - **[754e30728](facebook/react@754e30728 )**: Delete immediateQueueCallbackNode ([#20980](facebook/react#20980)) //<Andrew Clark>// - **[be5a2e231](facebook/react@be5a2e231 )**: Land enableSyncMicrotasks ([#20979](facebook/react#20979)) //<Andrew Clark>// - **[f6bc9c824](facebook/react@f6bc9c824 )**: [Fizz] Expose maxBoundarySize as an option ([#21029](facebook/react#21029)) //<Sebastian Markbåge>// - **[154b85213](facebook/react@154b85213 )**: [Fizz] Expose a method to explicitly start writing to a Node stream ([#21028](facebook/react#21028)) //<Sebastian Markbåge>// - **[cf485e6f6](facebook/react@cf485e6f6 )**: [Fizz] Expose a method to abort a pending request ([#21027](facebook/react#21027)) //<Sebastian Markbåge>// - **[3fb11eed9](facebook/react@3fb11eed9 )**: React Native: Touch Instrumentation Interface ([#21024](facebook/react#21024)) //<Timothy Yung>// - **[825c3021f](facebook/react@825c3021f )**: Don't delete trailing mismatches during hydration at the root ([#21021](facebook/react#21021)) //<Sebastian Markbåge>// - **[1d1e49cfa](facebook/react@1d1e49cfa )**: [Fizz] Assign an ID to the first DOM element in a fallback or insert a dummy (and testing infra) ([#21020](facebook/react#21020)) //<Sebastian Markbåge>// - **[466b26c92](facebook/react@466b26c92 )**: Store commit durations on HostRoot for DevTools access ([#20983](facebook/react#20983)) //<Brian Vaughn>// - **[89acfa639](facebook/react@89acfa639 )**: Fix native event batching in concurrent mode ([#21010](facebook/react#21010)) //<Ricky>// - **[0203b6567](facebook/react@0203b6567 )**: chore: update react-reconciler README ([#21016](facebook/react#21016)) //<susiwen8>// Changelog: [General][Changed] - React Native sync for revisions c9f6d0a...6d3ecb7 jest_e2e[run_all_tests] Reviewed By: JoshuaGross, kacieb Differential Revision: D27231625 fbshipit-source-id: 89c0c0662e69044ae8890486a693013bee6005dd
* Expose maxBoundarySize as an option * Adjust the heuristic * Rename to progressiveChunkSize
Bike shed now or forever hold your peace.