Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce copying for large payloads #92

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

marcomagdy
Copy link

@marcomagdy marcomagdy commented Nov 29, 2023

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.

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.

Another small optimization is to check if string is empty rather than
compare it with a literal empty string.
@marcomagdy
Copy link
Author

Ping @andclt @carlzogh please take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants