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

Make rebuilds without code changes take less time #1086

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

toshok
Copy link

@toshok toshok commented Jan 21, 2024

build.js is unconditionally writing/touching source files, which results in some unnecessary recompilation locally. instead let's compare old/new contents and only write if we need to/touch if things have changed.

Drops the rebuild time (with no code changes) from ~45s to ~15s on my m2 mbp.

probably something best done via buck longer term, but this felt like a pretty easy change.

@@ -120,6 +115,11 @@ fs.writeFileSync(
`
);

if (currentPlatform() == "macOS" && drived_h_changed) {
// Make sure the main executable gets rebuilt with the new build ID.
Copy link
Author

Choose a reason for hiding this comment

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

shouldn't normal ninja deps ensure this already?

Copy link

Choose a reason for hiding this comment

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

I'm not sure, I don't remember adding this part 😬

@toshok toshok requested review from Domiii and jazzdan January 22, 2024 17:24
@@ -120,6 +115,11 @@ fs.writeFileSync(
`
);

if (currentPlatform() == "macOS" && drived_h_changed) {
// Make sure the main executable gets rebuilt with the new build ID.
Copy link

Choose a reason for hiding this comment

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

I'm not sure, I don't remember adding this part 😬

@jazzdan
Copy link

jazzdan commented Jan 22, 2024

Nice!

…them if they've changed. drops local mac arm build (on no local change, with no driver change) from 45s to 15s
@toshok toshok force-pushed the toshok/make-rebuilds-quicker branch from e8332bb to c7ea6e7 Compare January 26, 2024 04:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants