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

[Performance] Reduce unnecessary copying of strings and objects #129

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

marcomagdy
Copy link

Description of changes:

This patch attempts to improve performance by doing the following:

  1. Remove an extra getenv call, which internally involve a bunch of string copying.
  2. Avoid default constructing the invocation_request object only to overwrite it later with the actual request. Instead use a reference.
  3. Avoid copying the request string when we can pass it by reference

Testing:

  • make test
  • make test-integ

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.

This patch attempts to improve performance by doing the following:
1. Remove an extra `getenv` call, which internally involve a bunch of
   string copying.
2. Avoid default constructing the `invocation_request` object only to
   overwrite it later with the actual request. Instead use a reference.
3. Avoid copying the request string when we can pass it by reference

Testing:
- make test
- make test-integ
@marcomagdy marcomagdy marked this pull request as ready for review November 28, 2023 20:05
@marcomagdy
Copy link
Author

FWIW, I wrote the native the client.

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.

1 participant