Repository navigation
Add separate PrivateIdentifier and SourceFile constructors - #36844
Arpad Borsos (Swatinem) wants to merge 1 commit into
Conversation
|
TypeScript Bot (@typescript-bot) perf test this |
|
Heya Nathan Shively-Sanders (@sandersn), I've started to run the perf test suite on this PR at 7228ef0. You can monitor the build here. Update: The results are in! |
|
PrivateIdentifiers are rare and there are none in |
|
Nathan Shively-Sanders (@sandersn) Here they are:Comparison Report - master..36844
System
Hosts
Scenarios
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Actually the gains are from |
|
I'd like Ron Buckton (@rbuckton) to sign off on this before merging. When I showed it to him yesterday, he pointed out that it's probably overkill to give all Nodes their own constructors, but the top 10 would benefit. Things like BinaryExpression, PropertyAccessExpression, maybe ElementAccessExpression. I'll let him give the entire list. |
|
I also don’t think giving each node its own constructor is worth it. At least not now with the way that the API is structured. |
|
TypeScript Bot (@typescript-bot) perf test this |
|
Heya Daniel Rosenwasser (@DanielRosenwasser), I've started to run the perf test suite on this PR at 7228ef0. You can monitor the build here. |
|
I'll merge this in if the numbers look reasonable, otherwise there's no use in stalling this for generalizing it to other node types. |
I think this needs a rebase at least. |
7228ef0 to
458e665
Compare
|
Daniel Rosenwasser (@DanielRosenwasser) rebased, please try again |
|
TypeScript Bot (@typescript-bot) perf test this |
|
Heya Daniel Rosenwasser (@DanielRosenwasser), I've started to run the perf test suite on this PR at 458e665. You can monitor the build here. Update: The results are in! |
|
Daniel Rosenwasser (@DanielRosenwasser) Here they are:Comparison Report - master..36844
System
Hosts
Scenarios
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This lowers the memory usage when compiling `src/compiler` from **277M** to **273M**, so a modest ~1.5% win.
458e665 to
99b9eee
Compare
|
This PR doesn't have any linked issues. Please open an issue that references this PR. From there we can discuss and prioritise. |
|
TypeScript Bot (@typescript-bot) perf test |
|
Heya Ron Buckton (@rbuckton), I've started to run the perf test suite on this PR at 99b9eee. You can monitor the build here. Update: The results are in! |
|
Ron Buckton (@rbuckton) Here they are:Comparison Report - main..36844
System
Hosts
Scenarios
Developer Information: |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
This doesn't seem to have a consistent positive effect on compilation as memory usage and compilation time are mostly unchanged. I don't think this change is warranted at this time. |
This lowers the memory usage when compiling
src/compilerfrom 277M to 273M, so a modest ~1.5% win.
Same as #33431, this further splits
NodefromSourceFile, which reduces the size ofNodes from 160 bytes to 144