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

Examples build speedup #6288

Merged
merged 4 commits into from
Apr 25, 2024
Merged

Examples build speedup #6288

merged 4 commits into from
Apr 25, 2024

Conversation

kpal81xd
Copy link
Contributor

@kpal81xd kpal81xd commented Apr 25, 2024

Fixes #6230

  • Disables build output for standalone files (not used)
  • Disables copying over of assets that are unlikely to change for each rebuild
  • Converted generate standalone and file copy to be done on buildEnd hook
  • Outputs into cache directory to remove deletion call on build writing
  • Changes execSync call to use node directly instead of npm (caused slowdown)

Build takes ~750ms on M1 Macbook

const target = targets[i];
if (target.once && copied.has(target.src)) {
if (log) {
console.log(`${YELLOW_OUT}skipped copying ${BOLD_OUT}${target.src}${REGULAR_OUT}`);
Copy link
Contributor

Choose a reason for hiding this comment

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

I assume this don't log out on each rebuild?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No by default log is false you have to pass it as a parameter

Copy link
Contributor

@mvaligursky mvaligursky left a comment

Choose a reason for hiding this comment

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

Sounds fantastic!

@kpal81xd kpal81xd merged commit af5a66d into main Apr 25, 2024
7 checks passed
@willeastcott willeastcott deleted the examples-build-speedup branch April 25, 2024 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Examples - build step takes progressively longer each time
2 participants