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

[BUILDING.md] Update GNU/Linux Speeding up section #52116

Closed
wants to merge 3 commits into from

Conversation

congzhangzh
Copy link
Contributor

  1. C/C++ link is slow, especially for node like project, which will link GBs data to 100MB like size
  2. C/C++ link process can not be cached
  3. mold is really really fast

1. C/C++ link is slow, especially for node like project, which will link GBs data to 100MB like size
2. C/C++ link process can not be cached
3. mold is really really fast
@nodejs-github-bot nodejs-github-bot added build Issues and PRs related to build files or the CI. doc Issues and PRs related to the documentations. labels Mar 16, 2024
@congzhangzh
Copy link
Contributor Author

congzhangzh commented Mar 17, 2024

@targos @rvagg @jasnell @refack @Trott Hi folks, can you do a doc review? or cc to others if needed:)

/cc @nodejs/build

@Trott
Copy link
Member

Trott commented Mar 20, 2024

@nodejs/build

I don't think we want to recommend or document mold unless core team members are already using it.

@H4ad
Copy link
Member

H4ad commented Mar 21, 2024

I give it a try and it seems to reduce my build time from 17s to 10s while using ccache after compiling it once.

Without ccache, I didn't see any significant change in the build time.

@congzhangzh
Copy link
Contributor Author

I give it a try and it seems to reduce my build time from 17s to 10s while using ccache after compiling it once.

Without ccache, I didn't see any significant change in the build time.

@H4ad hi, have you remove out dir completely before you do link speed comparison? As node c++ part is small compared to other third party.

@H4ad
Copy link
Member

H4ad commented Mar 21, 2024

@congzhangzh Of course, I also tried switching between clang and g++ and I didn't see significant changes in build time with or without mold.

But in any case, mold looks promising and it didn't break the builds locally, if you want to land this change, I can approve if you rename your commit/pr to something like: doc: add mold to linux speeding up section to match the guidelines.

Also, remove the commit/changes related to Windows, this can be a separated PR.

@congzhangzh
Copy link
Contributor Author

@congzhangzh Of course, I also tried switching between clang and g++ and I didn't see significant changes in build time with or without mold.

But in any case, mold looks promising and it didn't break the builds locally, if you want to land this change, I can approve if you rename your commit/pr to something like: doc: add mold to linux speeding up section to match the guidelines.

Also, remove the commit/changes related to Windows, this can be a separated PR.

@H4ad Cool, I will split this part into another pull request!

BTW, I want to try to verify the mold again, as your machine is super fast, my machine is a little slow and has less memory
The link problem is a nightmare when I do some Chromium development and some other heavy C++ projects, I will be back later!

@congzhangzh
Copy link
Contributor Author

congzhangzh commented Mar 21, 2024

@H4ad Hi Vinicius,

speed-related pull request is created: #52179
windows build failed related pull request is created: #52181

@congzhangzh congzhangzh closed this by deleting the head repository Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues and PRs related to build files or the CI. doc Issues and PRs related to the documentations.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants