Conversation
|
This should work great if a particular project enforces no cycles (e.g. via |
|
If the overhead is too great (not saying it necessarily is), looks like making the "passQuickly" optional would be reasonably easy? Would be great to get this in - my team is concerned about adding this plugin because of performance (we'd have failOnError on, so would expect failure to be the unusual case). |
|
Well in my experience the overhead (in case of cycles present) is <1%, so I'd call than negligible. If you have cycles that you are fine with then you really need a setting that somehow excludes that cycle from error reporting. Though I'd argue that your time would be much better spent breaking that cycle than figuring out how to configure webpack to allow a particular circular dependency. |
|
On webpack 5 this branch shows the following warning: |
This branch implements the fast acyclic test based on the depth first search. If there are cycles then the old algorithm is used, in particular the output stays the same.
In my project (5000+ webpack modules) this speeds up the circular dependency check from about 4300ms to 30ms (of course only if there are no cycles, if there are then nothing changes)
FIxes #65