ts2c icon indicating copy to clipboard operation
ts2c copied to clipboard

Can it do bootstrapping? It is so slow.

Open zaoqi-unsafe opened this issue 5 years ago • 4 comments

zaoqi-unsafe avatar Apr 20 '19 05:04 zaoqi-unsafe

Not sure what you mean by bootstrapping, but big part of transpilation is preprocessing provided by TypeScript (and I cannot do anything about it). If you could provide some concrete examples where transpilation is very slow in TS2C comparing to normal TypeScript (e.g. compare time ts2c test.ts and time tsc test.ts), then I might be able to do some optimizations, even though I don't really consider transpilation speed important at this point.

andrei-markeev avatar Apr 20 '19 08:04 andrei-markeev

https://github.com/andrei-markeev/ts2c/blob/master/package.json

2.8.3 is pretty old.

zaoqi avatar Apr 20 '19 11:04 zaoqi

Enum is not implemented.So I need to first tsc.

zaoqi avatar Apr 20 '19 11:04 zaoqi

2.8.3 is pretty old

true, but for now I am only implementing ES3 spec, so it doesn't really matter which TS version is used. I will update it at some point but I don't think it will affect anything.

Enum is not implemented. So I need first tsc

My previous comment still stands: ts2c sort of runs tsc behind the scenes for getting AST and semantic information. So running ts2c cannot be faster than running tsc on the same file.

andrei-markeev avatar Apr 20 '19 14:04 andrei-markeev