> ## Documentation Index
> Fetch the complete documentation index at: https://cdktn.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Performance - CDK Terrain

> The faster you can synthesize your CDKTN code, the faster you can deploy it. Learn how to optimize your CDK Terrain performance.

The faster you can synthesize your CDKTN code, the faster you can deploy it.
This page focuses on how to optimize your CDK Terrain performance.

## TypeScript

In TypeScript, the main bottleneck for synthesization performance is the time it takes `ts-node` or `tsc` to compile your code.
The easiest way to improve this is using explicit resource imports like `import { MyResource } from '@cdktn/provider-my-provider/lib/my-resource'` instead of star imports like `import * as myProvider from '@cdktn/provider-my-provider'`.
Another option is to use a bundler without typechecking like [`tsx`](https://github.com/esbuild-kit/tsx) or [`swc`](https://swc.rs/) to compile your code. These are typically a lot faster than `tsc` or `ts-node`, but you will get no typechecking.

## Python

Python is out of the box optimized for synthesization performance. There are no known steps to improve the synthesization performance.

## Java

To improve the synthesization performance of Java, we recommend using [Gradle](https://gradle.org/) over [Maven](https://maven.apache.org/). In an example using the AWS provider, we observed an improvement from 3m 30s to 30s after the initial compilation. To migrate to Gradle, we recommend creating a new CDKTN project and copying the code over.

## C\#

C# is out of the box optimized for synthesization performance. There are no known steps to improve the synthesization performance.

## Go

Go is out of the box optimized for synthesization performance. There are no known steps to improve the synthesization performance.
