Skip to content
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

[docs] Only server-side render the popular languages #17249

Merged
merged 2 commits into from
Sep 1, 2019

Conversation

oliviertassinari
Copy link
Member

@oliviertassinari oliviertassinari commented Aug 31, 2019

Netlify deploy is broken, the build is too slow. We have 15 minutes and 1 CPU to do all the work.
Maybe we should build on CircleCI and have Netlify deploy the output, to consider in the future 😁.

We can deploy the documentation for v4.4.0 live once this is merged.

@mui-pr-bot
Copy link

mui-pr-bot commented Aug 31, 2019

Details of bundle changes.

Comparing: 98f2c7c...3d5e1cc

bundle parsed diff gzip diff prev parsed current parsed prev gzip current gzip
@material-ui/core 0.00% 0.00% 331,074 331,074 90,395 90,395
@material-ui/core/Paper 0.00% 0.00% 68,774 68,774 20,485 20,485
@material-ui/core/Paper.esm 0.00% 0.00% 62,148 62,148 19,212 19,212
@material-ui/core/Popper 0.00% 0.00% 28,466 28,466 10,190 10,190
@material-ui/core/Textarea 0.00% 0.00% 5,094 5,094 2,137 2,137
@material-ui/core/TrapFocus 0.00% 0.00% 3,834 3,834 1,613 1,613
@material-ui/core/styles/createMuiTheme 0.00% 0.00% 16,386 16,386 5,828 5,828
@material-ui/core/useMediaQuery 0.00% 0.00% 2,541 2,541 1,058 1,058
@material-ui/lab 0.00% 0.00% 153,503 153,503 46,734 46,734
@material-ui/styles 0.00% 0.00% 51,492 51,492 15,304 15,304
@material-ui/system 0.00% 0.00% 15,668 15,668 4,358 4,358
Button 0.00% 0.00% 78,727 78,727 24,066 24,066
Modal 0.00% 0.00% 14,344 14,344 5,019 5,019
Portal 0.00% 0.00% 2,907 2,907 1,318 1,318
Rating 0.00% 0.00% 70,243 70,243 21,945 21,945
Slider 0.00% 0.00% 74,483 74,483 23,062 23,062
colorManipulator 0.00% 0.00% 3,904 3,904 1,543 1,543
docs.landing -0.10% -0.07% 52,305 52,253 13,790 13,780
docs.main -0.01% -0.03% 597,495 597,413 190,866 190,804
packages/material-ui/build/umd/material-ui.production.min.js 0.00% 0.00% 301,963 301,963 86,703 86,703

Generated by 🚫 dangerJS against 3d5e1cc

@oliviertassinari oliviertassinari force-pushed the fix-netlify-deploy branch 9 times, most recently from 588b023 to 0f9017c Compare August 31, 2019 21:30
@oliviertassinari oliviertassinari added the docs Improvements or additions to the documentation label Aug 31, 2019
@oliviertassinari oliviertassinari changed the title investigation [docs] Only server-side render the popular languages Aug 31, 2019
traverse(pages, userLanguage);
});
}
// if (process.env.PULL_REQUEST === 'true') {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To uncomment before merging.

const { t } = useSelector(state => ({
t: state.options.t,
}));
const t = useSelector(state => state.options.t);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note for self, it's what happens when you work on something without internet to verify it's optimal.

useSelector() uses strict === reference equality checks by default, not shallow equality (see the following section for more details).

https://react-redux.js.org/next/api/hooks#useselector

}
}

function AppWrapper(props) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inline the file directly into _app.js. As long as the file is less than 1k LOCs (~400 here), we should be fine.

@oliviertassinari oliviertassinari marked this pull request as ready for review August 31, 2019 21:37
@oliviertassinari
Copy link
Member Author

oliviertassinari commented Aug 31, 2019

Interesting, Next.js was using, for the static export, 7 threads and 10 of concurrency for a single CPU. This wasn't working well (5 pages/s), reducing to 3 threads and 5 of concurrency helps (10 pages/s).

Copy link
Member

@mbrookes mbrookes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not going to pretend to understand most of that, but it builds, and the non-SSR languages are working, so: 👌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to the documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants