devexperts / swagger-codegen-ts

Typesafe Swagger API generator for TypeScript
Mozilla Public License 2.0
80 stars 16 forks source link

try optimize code #158

Open Geksanit opened 3 years ago

Geksanit commented 3 years ago

image in this snippet, the function is called three times with the same result, almost. Perhaps you can get by with just one function call.

Geksanit commented 3 years ago

I think this will speed up the code generation time

kokovtsev commented 3 years ago

In our project, this function takes just ~240ms of ~24s, i.e. just 1% of the total time. But it's a good point that we could or should eventually profile the app to check if there is an easy speed boost!