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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add cache idle hooks #3236

Merged
merged 1 commit into from
May 30, 2023

Conversation

edusperoni
Copy link
Contributor

@edusperoni edusperoni commented May 19, 2023

Related issue (if exists)

#3158

Summary

Similar to the shutdown hook, the idle hooks are used by ProgressPlugin to mark the end of a compilation.

馃 Generated by Copilot at 5cb8dcc

Added build status and cache management to Compiler class in packages/rspack/src/compiler.ts. This improves the performance and reliability of the web packer tool.

Walkthrough

馃 Generated by Copilot at 5cb8dcc

  • Add idle property to Compiler class to indicate whether the compiler is idle or busy (link, link)
  • Set idle to true before and after cleaning up cache in run method of Compiler class (link)
  • Check idle and restore cache state before executing build task in run method of Compiler class (link)
  • Modify cache.endIdle method to take a callback function that sets idle to false and calls build task function (link)

@IWANABETHATGUY IWANABETHATGUY added this pull request to the merge queue May 30, 2023
Merged via the queue into web-infra-dev:main with commit 53f1404 May 30, 2023
12 checks passed
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.

None yet

2 participants