Known performance issues
### Tasks for `oxc` (Thanks!)
- [ ] https://github.com/swc-project/swc/pull/9602
- [ ] Remove `chain!` and apply visitors by one-by-one.
- [ ] For esnext + typescript/ react-dev, resolver / hygiene / fixer is way too much overhead.
- [ ] https://github.com/swc-project/swc/issues/9603
- [ ] `swc_common` should not analyze source code if not required
- [ ] `is_reserved` in `swc_ecma_parser` is not necesssary in many cases
- [ ] https://github.com/swc-project/swc/pull/9613
Does this mean chain! will be removed entirely?
I think we should. It seems like it's misdesigned.
If I understand it correctly, it simply visits with A then B, so same as visit_with(A); visit_with(B). I think we should make it combine all visitors together and visit in one pass or just remove it. This might work for some existing visitors but I'm not sure. If it does, it would probably optimize said visitors.
In the profiling result, visit_with(noop()) was not a noop if it's mixed with Box<dyn Fold>. That's why I think it's misdesigned.
Performance profiling result for a large file.
Renaming pass and block_scoping pass is too slow.
Slow functions:
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.