feat: Optimize live bindings in export declarations (#18494)
Optimized live bindings processing to reduce overhead
- Improved performance by optimizing the handling of live bindings.
- Ensured correct hook calls and traversal logic for better consistency.
Fixes #18494
What kind of change does this PR introduce?
- 🛠️ Performance Optimization
Did you add tests for your changes?
- ✅ Yes, relevant test cases have been added to ensure correctness.
Does this PR introduce a breaking change?
- ⚠️ No, this change does not introduce any breaking changes.
What needs to be documented once your changes are merged?
- 📖 Update the documentation on how live bindings are processed and optimized.
- ✅ Ensure any relevant API or behavior changes are reflected in the docs.
@bworline do you want to check over this also?
@Vansh5632 please review the test failures and snapshot failures.
@TheLarkInn i am not able to understand the reason behind basic test failing can you give me little bit guidance it will be really grateful
There are two problems:
- Wrong types, you can run type lint and fix them
- Based on our tests you missed some cases, you can run failed cases locally and looks why it was failed
Super excited about this change and the perf benefits. However, it's difficult to the see the results of this change. Can you show a before and after of webpack generated code, illustrating where the optimization takes place for exports that are not live and those that remain live because of a reference?
@TheLarkInn can you re-open the underlying issue? It got auto-closed.
@bworline Done