~/talk

Typescript Performance: Going Beyond The Surface

Talkat BeJS Conf 2023 Β· 2023-05-11..05-12Β· [typescript, web-performance]
slides:none on file

Upgrading TypeScript cuts a 35s compile to under 12s; a 14s project drops to 2s after replacing expensive styled-component inference with a simple typed function and named types. Use tsc --generateTrace plus the Chrome tracing view or typescript-analyze-trace to find the exact file and AST node causing slow checks. Large unions (example: 74,387 string literals) and heavy inference cause 112s files; extract or name complex types, add generics to skip inference, and enable incremental builds (tsbuildinfo).

AI-written summary Β· about

  1. 0:00Introduction to TypeScript performance
  2. 2:05Why TypeScript performance matters
  3. 4:52Keeping TypeScript up to date
  4. 7:39How TypeScript compiler works
  5. 11:14Debugging slow builds
  6. 13:42Generating TypeScript traces
  7. 18:45Optimizing TypeScript config
  8. 19:08Simplifying complex types
  9. 20:37Refactoring for performance
  10. 22:03Skipping type inference
  11. 24:34Avoiding verbose types
  12. 25:37Using incremental builds
  13. 26:41Reporting performance issues
  14. 27:01Summary and final tips
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark β€” the status bar button does the same
?
this help
esc
close this, then clear every filter β€” or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.