xicons
xicons copied to clipboard
The `tsc` memory usage problem
I have an existing vite project with @ricons/material
and @ricons/antd
as devDependencies, and when I ran tsc --diagnostics
command , here's the result:
Files: 12372
Lines: 218414
Identifiers: 345716
Symbols: 198770
Types: 16247
Instantiations: 79425
Memory used: 2166158K
I/O read: 0.55s
I/O write: 0.00s
Parse time: 3.74s
Bind time: 1.08s
Check time: 1.10s
Emit time: 0.00s
Total time: 5.91s
Then I added the @ricons/fluent
to devDependencies, imported an icon from the library, and then re-ran the command again, here's the result:
Files: 22443
Lines: 268767
Identifiers: 486698
Symbols: 249123
Types: 16248
Instantiations: 79425
Memory used: 3877564K
I/O read: 1.91s
I/O write: 0.00s
Parse time: 10.67s
Bind time: 3.06s
Check time: 4.51s
Emit time: 0.00s
Total time: 18.25s
We can see that with the new icon package added to the devDependencies, the tsc program had to use much more memory than before. How can we resolve it?