Skip to content

Too much compile time to resolve a complex function signiture definition. #7082

Closed
@tetsuharuohzeki

Description

@tetsuharuohzeki

Example Environment

  • typescript@1.9.0-dev.20160207
  • rxjs@5.0.0-beta.2

Abstraction

I found the case that the compile time of tsc increases to ~15x to resolve a complex function signature definition when I update rxjs to 5.0.0-beta.2 from 5.0.0-beta.1 (karen-irc/karen#574).

But after this commit, the compile time was recovered to the previous one.

beta.1 beta.2 beta.2 + explicit type annotations
Files: 111 124 124
Lines: 28560 29011 29012
Nodes: 119182 125219 125258
Identifiers: 44304 46931 46945
Symbols: 2960494 5126214 3375603
Types: 66178 1069572 41087
Memory used: 165777K 1264781K 118627K
I/O read: 0.03s 0.04s 0.04s
I/O write: 0.32s 0.31s 0.22s
Parse time: 0.48s 0.73s 0.64s
Bind time: 0.28s 0.41s 0.31s
Check time: 1.83s 31.48s 1.67s
Emit time: 0.52s 1.53s 0.43s
Total time: 3.10s 34.15s 3.05s

rxjs@5.0.0-beta.2 has some pretty complex type signitured functions:

I know the type inference is not omnipotent, it need a complex computations, and this issue may be a corner-case of TypeScript compiler.
But I also think this would be a problem if libraries having a complex type signatures rises in the future.

Could you resolve this problem?

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptFixedA PR has been merged for this issue

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions