aws / aws-lambda-nodejs-runtime-interface-client

Apache License 2.0
177 stars 57 forks source link

Reduce copying for large payloads #92

Open marcomagdy opened 8 months ago

marcomagdy commented 8 months ago

Description of changes:

Starting with aws-lambda-cpp v0.2.7 we can move the payload from the outcome of the API. This should help performance especially for larger payloads.

A couple more small optimizations:

  1. Pass standard strings to NAPI::String::New rather than its C-string representation is faster.
  2. When checking if the string is empty, using .empty() is much faster than comparing to a literal empty string.

Target (OCI, Managed Runtime, both):

both

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

marcomagdy commented 7 months ago

Ping @andclt @carlzogh please take a look.