You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature Request] Add caching mechanism to improve performance on large projects #404
When using ArchUnitNET in large .NET solutions with many assemblies, running architecture tests in CI pipelines can become very slow.
Currently, ArchLoader().LoadAssemblies(...).Build() always scans assemblies from scratch on every test run.
In ArchUnit for Java, this problem was solved by introducing a caching layer for the imported architecture model. This significantly reduced execution time by avoiding redundant scanning when assemblies did not change.
Proposal
Introduce a caching mechanism in ArchUnitNET core:
In-memory cache: Reuse the already loaded Architecture model within the same test run.
Persistent cache: Serialize the Architecture object to disk and reload it in subsequent runs, if assemblies have not changed.
Cache invalidation
The cache should be invalidated if:
An assembly file has changed (e.g. hash or timestamp).
ArchUnitNET version changes (internal model may not be compatible).
[Optional] Additional cache key provided by user.
Benefits
Greatly improves performance in CI/CD pipelines for large solutions.
Aligns ArchUnitNET with the Java version, which already supports caching.
Reduces feedback time for developers running tests locally.
Activity