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

Reuse angular cache in CI #32

Open
Dassderdie opened this issue Jan 7, 2022 · 3 comments
Open

Reuse angular cache in CI #32

Dassderdie opened this issue Jan 7, 2022 · 3 comments
Assignees
Labels
BP2022HG1 - Low Priority BP2022HG1 - Needs Discussion or Decisions CI This is about the CI enhancement New feature or request Legacy Issues that were created by the 2021 BP meta Issues mainly related to non-TS stuff (e.g. CI)

Comments

@Dassderdie
Copy link
Collaborator

Angular CLI saves a number of cachable operations on disk. This cache should be reused by our ci.
Our cache is located under frontend/.angular/cache.

@Dassderdie Dassderdie changed the title Reuse angular cache in ci Reuse angular cache in CI Jan 7, 2022
@Dassderdie Dassderdie added CI This is about the CI enhancement New feature or request labels Jan 7, 2022
@ClFeSc
Copy link
Contributor

ClFeSc commented Jan 7, 2022

How can we detect whether the Cache needs to be invalidated (i.e. when is it outdated)? Does Angular detect that on its own?

@Dassderdie
Copy link
Collaborator Author

As far as I understood it angular reuses some parts of the cache and updates the invalid ones automatically. So we would probably have to update the cached angular cache after each run.

@Dassderdie
Copy link
Collaborator Author

There are several parts of the pipeline that are cached on disk, the main benefit of this is that future compilations become warm as the build state is restored from disk instead of having to start the build from a cold state. This helps to decrease the build time by up to 65% as a number of computations are not performed.

There are a number of things that are cached, including but not limited to:

  • Babel transformations
  • Results of the minified CSS and JS
  • Build dependencies and resolutions
  • Modules transformation result

The cache is expected to continue to grow unless it is periodically purged by the users. The more code changes are performed in a repo, the larger the cache will become. You can read the cache documentation on how to clear the cache.

In future, we are hoping to perform automatic cleanups of stalled cache data.

angular/angular-cli#22323 (comment)

@ClFeSc ClFeSc added the meta Issues mainly related to non-TS stuff (e.g. CI) label Jan 29, 2022
@benn02 benn02 added the Legacy Issues that were created by the 2021 BP label Jan 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BP2022HG1 - Low Priority BP2022HG1 - Needs Discussion or Decisions CI This is about the CI enhancement New feature or request Legacy Issues that were created by the 2021 BP meta Issues mainly related to non-TS stuff (e.g. CI)
Projects
None yet
Development

No branches or pull requests

3 participants