Skip to content

Slow compilation with really huge declaration files #8521

Closed
@PanayotCankov

Description

@PanayotCankov

Hello,

The NativeScript framework exposes all native Android and iOS APIs to JavaScript. To take use of the TypeScript features we have tools to generate TypeScript declaration files. These declaration files are verified to have no syntax or type errors when they are generated.

Compiling a small ts file that references types from the big d.ts-es results in about 15 sec. compilation time on our side. Anything that can help us to speed up the build time would be greatly appreciated.

This is how the diagnostics of a project using our .d.ts-es looks like:

nativescript-big-dts cankov$ tsc
Files:               4
Lines:          317792
Nodes:         1235680
Identifiers:    486912
Symbols:        709471
Types:          145659
Memory used:   824485K
I/O read:        0.02s
I/O write:       0.00s
Parse time:      2.04s
Bind time:       1.32s
Check time:     12.09s
Emit time:       0.03s
Total time:     15.49s

I have prepared a small project suitable for profiling here:
https://github.com/PanayotCankov/nativescript-big-dts

Thanks,

Metadata

Metadata

Assignees

Labels

FixedA PR has been merged for this issueSuggestionAn idea for TypeScript

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions