DEV Community

Cover image for TypeScript ๐Ÿ๐ŸŽ๐ฑ Faster? Your App gets 10x ๐๐ž๐ซ๐Ÿ๐จ๐ซ๐ฆ๐š๐ง๐œ๐ž Boost? What's the ๐ญ๐ซ๐ฎ๐ญ๐ก?
Dat Le
Dat Le

Posted on

TypeScript ๐Ÿ๐ŸŽ๐ฑ Faster? Your App gets 10x ๐๐ž๐ซ๐Ÿ๐จ๐ซ๐ฆ๐š๐ง๐œ๐ž Boost? What's the ๐ญ๐ซ๐ฎ๐ญ๐ก?

TypeScript ๐Ÿ๐ŸŽ๐ฑ Faster? Your App gets 10x ๐๐ž๐ซ๐Ÿ๐จ๐ซ๐ฆ๐š๐ง๐œ๐ž Boost? What's the ๐ญ๐ซ๐ฎ๐ญ๐ก?

MS have major optimizations for TypeScript, claiming a 10x speed improve of compiler. What's the question in here, your TS app will run 10x faster? :)

โ†’ Compilation speed is good, not really for runtime yet!!

Whatโ€™s things ๐—ฟ๐—ฒ๐—ฎ๐—น๐—น๐˜† ๐—ฐ๐—ต๐—ฎ๐—ป๐—ด๐—ฒ๐—ฑ about??

  • Type Checking
  • Compiler Speed
  • Dependency Analyst
  • Better Caching & Memory Usage

Almost all thats, so, unfortunately, these affect the TypeScript ๐—ฑ๐—ฒ๐˜ƒ๐—ฒ๐—น๐—ผ๐—ฝ๐—บ๐—ฒ๐—ป๐˜ :(

โ†’ Your performance depends on ๐˜†๐—ผ๐˜‚๐—ฟ ๐—ผ๐—ฝ๐˜๐—ถ๐—บ๐—ถ๐˜‡๐—ฒ for your apps.

So, what keys you can focus on and apply these to speed up your TS app??

  • Faster caches build information, kind use --๐ข๐ง๐œ๐ซ๐ž๐ฆ๐ž๐ง๐ญ๐š๐ฅ
tsc --incremental
Enter fullscreen mode Exit fullscreen mode
  • Skip unnecessary check libraries, use --๐ฌ๐ค๐ข๐ฉ๐‹๐ข๐›๐‚๐ก๐ž๐œ๐ค
tsc --skipLibCheck
Enter fullscreen mode Exit fullscreen mode
  • node_modules handle, --๐—ฑ๐—ถ๐˜€๐—ฎ๐—ฏ๐—น๐—ฒ๐—ฆ๐—ผ๐˜‚๐—ฟ๐—ฐ๐—ฒ๐—ข๐—ณ๐—ฃ๐—ฟ๐—ผ๐—ท๐—ฒ๐—ฐ๐˜๐—ฅ๐—ฒ๐—ณ๐—ฒ๐—ฟ๐—ฒ๐—ป๐—ฐ๐—ฒ๐—ฅ๐—ฒ๐—ฑ๐—ถ๐—ฟ๐—ฒ๐—ฐ๐˜
tsc --disableSourceOfProjectReferenceRedirect
Enter fullscreen mode Exit fullscreen mode
  • Use ๐˜๐˜€๐—ฐ --๐—ฏ๐˜‚๐—ถ๐—น๐—ฑ for enables faster compilation
tsc --build
Enter fullscreen mode Exit fullscreen mode
  • Upgrade to TypeScript ๐—Ÿ๐—ฎ๐˜๐—ฒ๐˜€๐˜ ๐—ฉ๐—ฒ๐—ฟ๐˜€๐—ถ๐—ผ๐—ป

What's your mind about this changed or this topic miss something, let's discuss it together below :)

Image of Datadog

Create and maintain end-to-end frontend tests

Learn best practices on creating frontend tests, testing on-premise apps, integrating tests into your CI/CD pipeline, and using Datadogโ€™s testing tunnel.

Download The Guide

Top comments (1)

Collapse
 
ltndat1 profile image
Dat Le โ€ข

Image description
Let discuss together :)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs