tsearch
tsearch copied to clipboard
Performance optimization on the extract
Currently extracting takes way too long, around 10-20s per project, there are +6k projects in DefinitelyTyped (the whitelist will end up having quite some many projects as well).
Now we use the ts-morph wrapper around TypeScript compiler to extract. It supports very handy methods that help to easily extract types, it was great for PoC and maybe v1 as well.
We could consider
- Using tsc directly, probably getting some performance improvements out of it.
- Using swc: A JS compiler written in Rust. The v1 already supports TypeScript. They are working on type checking but not sure if that's necessary as we should trust projects to be published with types already working.