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

GraalVM updates to extract the shared lib with native image instead of package as resource #816

Merged
merged 41 commits into from
Sep 13, 2024

Conversation

TingDaoK
Copy link
Contributor

@TingDaoK TingDaoK commented Aug 12, 2024

Issue #, if available:

  • Add a new GraalVM Feature for CRT to extract the share lib to the path of native image, instead of rely on the extracting -> writing to temp -> load every time
  • In lambda, if you load CRT from the handler, this reduces the cold start time -> 300 ms
  • if you load CRT from the constructor, this reduces the cold start time -> 30 ms. the cold-start request take 500 ms (I did a load CRT and done).
  • Also reduced the binary size from 142M -> 101M for this demo https://github.com/aws-samples/serverless-graalvm-demo

Description of changes:

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

@TingDaoK TingDaoK changed the title Add extract lib api GraalVM updates to extract the shared lib with native image instead of package as resource Sep 4, 2024
Copy link
Contributor

@graebm graebm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How would one use this? There's no documentation

pom.xml Outdated Show resolved Hide resolved
src/main/java/software/amazon/awssdk/crt/CRT.java Outdated Show resolved Hide resolved
javadoc.options Outdated Show resolved Hide resolved
TingDaoK and others added 8 commits September 6, 2024 17:03
- move javadoc settings to be global, not just in the "release" profile
- move cmake-configure out of the "generate-sources" phase, so it doesn't run during javadoc generation (yay faster iteration)
README.md Outdated Show resolved Hide resolved
src/main/java/software/amazon/awssdk/crt/CRT.java Outdated Show resolved Hide resolved
src/main/java/software/amazon/awssdk/crt/CRT.java Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@TingDaoK TingDaoK merged commit 7f13df9 into main Sep 13, 2024
49 of 50 checks passed
@TingDaoK TingDaoK deleted the add-extract-lib-api branch September 13, 2024 21:15
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.

3 participants