rbuckton / reflect-metadata

Prototype for a Metadata Reflection API for ECMAScript

Home Page:https://rbuckton.github.io/reflect-metadata

Repository from Github https://github.comrbuckton/reflect-metadataRepository from Github https://github.comrbuckton/reflect-metadata

Performance Impact

mirnpnh opened this issue · comments

I have looked around about it and didn't found any answer about it so sorry for asking here. If someone could shed some light on it. Reflection in both Java & .NET is very slow as we know. Is it same with TypeScript implementation? Is there any noticeable runtime performance impact evolved?

Typescript's metadata feature being a syntactic sugar and eventually turning into plan js code does not entail a performance impact.

The reason of me finding the same answer and came accross this post is that NestJS architecture utilizes reflect-metadata too often in the application development such as in Guards, Middlewares, Pipes etc and I was wondering if this impacts performance of backend on each request.