Allow to define a custom safeDecodeURI
tinchoz49 opened this issue · 2 comments
I'm working with aws-lambda-fastify
and I notice that the plugin does extra work related with parsing the url + querystring, things that are already done by the aws lambda itself.
One of this extra steps is the safeDecodeURI
and I was thinking that maybe we can have the option of a custom handler for that, like what you provide for querystringParser
.
Would you be open to a pr?
Thank you!
Hi, If I understand you correctly, you want to add a custom decodeURI
option. It wouldn't work because find-my-way has deep integration with a custom decoding mechanism. Like here
Line 188 in e3daace
+ find-my-ways decoding mechanism is really fast. If your URL is already decoded, it will cost you almost nothing.
Hi @ivan-tymoshenko, is true testing with the performance script of aws-lambda-fastify
my purpose does almost nothing improving the performance, find-my-way + fastify already does a nice job, I will close the issue.
Fastify is freaking fast
aws-serverless-express x 5,633 ops/sec ±5.36% (73 runs sampled)
(node:63081) [FSTDEP011] FastifyDeprecation: Variadic listen method is deprecated. Please use ".listen(optionsObject)" instead. The variadic signature will be removed in `fastify@5`.
(Use `node --trace-warnings ...` to show where the warning was created)
aws-serverless-fastify x 6,746 ops/sec ±1.61% (84 runs sampled)
serverless-http x 916 ops/sec ±185.47% (78 runs sampled)
aws-lambda-fastify x 103,775 ops/sec ±0.26% (89 runs sampled)
aws-lambda-fastify (serializeLambdaArguments : true) x 103,223 ops/sec ±0.14% (90 runs sampled)
aws-lambda-fastify (decorateRequest : false) x 103,249 ops/sec ±0.14% (88 runs sampled)
Fastest is aws-lambda-fastify
Thank you for the quick response.