Skip to content

Conversation

andresgutgon
Copy link
Contributor

@andresgutgon andresgutgon commented Sep 4, 2025

What?

Typescript performance is shit

TODO

  • Improve memory with these changes went from 3.8 GB -> 2.5 GB. Room for improvement
  • Review CRAZY inference on latitudeSchema with zod
  • Try -b option in tsconfig.json root adding "references"
  • Add cache for tsbuild to improve type checking in CI
  • Review evaluations type inference too. Maybe we can improve

Diagnostics

This command reveals number of files checked and also type declarations and memory

pnpm exec tsc --noEmit --extendedDiagnostics

CI cache of tsbuild

- name: Setup TS build cache
  uses: actions/cache@v3
  with:
    path: '**/node_modules/.cache/tsconfig.tsbuildinfo'
    key: ${{ runner.os }}-tsbuild-${{ hashFiles('**/tsconfig.json') }}
    restore-keys: |
      ${{ runner.os }}-tsbuild-

@andresgutgon andresgutgon added the 🚧 wip Work in progress label Sep 4, 2025
# Turbo
.turbo
.tsbuildinfo
tsconfig.tsbuildinfo
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is wrong. No need to add to gitignore.

The right place is

"tsBuildInfoFile": "node_modules/.cache/core.tsbuildinfo",

# New spans
apps/web/ingest
apps/workers/workspaces/*/traces
apps/web/tsc-tracing
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Garbage I generated

"./src/**/*.tsx",
"next-env.d.ts",
"next.config.js",
".next/types/**/*.ts"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This had a lot of shit. 3.8GB memory now 2.5GB

"jsx": "preserve",
"typeRoots": [
"./node_modules/@types"
],
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was wrong

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚧 wip Work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant