Repository navigation
Commit 864547a
authored
perf(javascript): release webpack's tree as the printer converts it (#22368)
The parse phase builds webpack's own tree and terser's, and held the
first whole while converting. A node's children are dead once it is
converted, so drop them there: peak RSS falls 1436 -> 1148 MiB on
typescript.js (9.1 MiB) and 2266 -> 2175 MiB on webpack's own bundle,
byte-identical output.
The HTML-comment guard also read a template's text as source, so any
bundle holding `<!--` or `-->` in a template declined after paying for
the parse; it now runs after the template text is taken.1 parent f321baf commit 864547a
3 files changed
Lines changed: 48 additions & 9 deletions
File tree
- .changeset
- lib/javascript
- test/unitCases
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8051 | 8051 | | |
8052 | 8052 | | |
8053 | 8053 | | |
8054 | | - | |
8055 | | - | |
8056 | | - | |
8057 | | - | |
8058 | | - | |
8059 | | - | |
8060 | | - | |
8061 | | - | |
8062 | 8054 | | |
8063 | 8055 | | |
8064 | 8056 | | |
| |||
8075 | 8067 | | |
8076 | 8068 | | |
8077 | 8069 | | |
| 8070 | + | |
| 8071 | + | |
| 8072 | + | |
| 8073 | + | |
| 8074 | + | |
| 8075 | + | |
| 8076 | + | |
| 8077 | + | |
| 8078 | + | |
| 8079 | + | |
8078 | 8080 | | |
8079 | 8081 | | |
8080 | 8082 | | |
| |||
9618 | 9620 | | |
9619 | 9621 | | |
9620 | 9622 | | |
| 9623 | + | |
| 9624 | + | |
| 9625 | + | |
| 9626 | + | |
| 9627 | + | |
| 9628 | + | |
| 9629 | + | |
| 9630 | + | |
| 9631 | + | |
| 9632 | + | |
| 9633 | + | |
| 9634 | + | |
| 9635 | + | |
| 9636 | + | |
| 9637 | + | |
| 9638 | + | |
| 9639 | + | |
| 9640 | + | |
9621 | 9641 | | |
9622 | 9642 | | |
9623 | 9643 | | |
9624 | 9644 | | |
9625 | 9645 | | |
| 9646 | + | |
| 9647 | + | |
| 9648 | + | |
| 9649 | + | |
| 9650 | + | |
| 9651 | + | |
| 9652 | + | |
| 9653 | + | |
| 9654 | + | |
| 9655 | + | |
9626 | 9656 | | |
9627 | 9657 | | |
9628 | 9658 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
190 | | - | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
191 | 195 | | |
192 | 196 | | |
193 | 197 | | |
| |||
0 commit comments