powertools-lambda-typescript icon indicating copy to clipboard operation
powertools-lambda-typescript copied to clipboard

Maintenance: performance tests for parser

Open am29d opened this issue 1 year ago • 0 comments

Summary

There are many different validation libraries available and we decided to use zod because of the combination of popularity, adoption, open source health and security. This is ideal for customer who already have zod schemas and want to use them in their workloads. For customers who want to start using runtime validation, the questions is which library they should use.

There are different benchmarks on validation libraries performance, but we don't have numbers how they perform in Lambda runtime. It is clear that they will not be faster. But for most customer looking into parser and zod specifically, customers will ask the question how the performance overhead is when using parser.

We should run performance tests for parser validation using zod and compare it to runtime without the parser. The possible variables are: nodejs version, memory, built-in schema, custom schema.

Why is this needed?

We need to understand the performance impact of parser utility and documental it transparently so customer can decide if they can use this utility, without experience negative impact after the implementation.

Which area does this relate to?

Parser

Solution

No response

Acknowledgment

Future readers

Please react with 👍 and your use case to help us understand customer demand.

am29d avatar Jan 25 '24 10:01 am29d