nestia icon indicating copy to clipboard operation
nestia copied to clipboard

Enhance `@nestia/sdk` performance by abandoning `ts-node`

Open samchon opened this issue 1 month ago • 4 comments

Current @nestia/sdk is using await import statement for every controller class ts files with ts-node. Therefore, @nestia/sdk is repeating TypeScript source parsing through TypeScript compiler API whenever new controller class comes, and such repeated process is making SDK library and Swagger Documents generation speed extremely slower.

To reduce the generation time, I'll abandon the await import statement with ts-node, and inject metadata information in the compilation level through transform API. Instead, this strategy requires @nestia/core must be required even when using only @nestia/sdk, but I think reducing generation time would be valuable for enduring the dependency.

samchon avatar May 03 '24 06:05 samchon