Commit 4568a8d
perf: use targeted AST lookups instead of getExportedDeclarations
Replace sourceFile.getExportedDeclarations() (which resolves all exports
and forces type checker work) with targeted lookups:
- getExportAssignment() for default exports
- getVariableDeclaration(name) for named exports
~10% improvement in lazy mode (9.06s -> 8.12s on real monorepo).1 parent aa835a4 commit 4568a8d
1 file changed
+12
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
97 | 102 | | |
98 | 103 | | |
99 | 104 | | |
| |||
0 commit comments