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

feat(type-safe-api): enable snapstart for java handlers by default and optimise java interceptors #597

Merged
merged 1 commit into from
Oct 16, 2023

Conversation

cogwirrel
Copy link
Member

Java handlers now have snapstart enabled by default to improve cold start times.

Ensure logging, metrics and tracing interceptors perform as much initialisation as possible during the init phase which can therefore be saved from snapstart invocations.

Also move the annotation processing to the init phase since this takes approximately a second.

This reduces cold start times from ~25s down to ~4s. Warm invocations remain the same at <100ms.

On a cold start it seems as though the logger takes about 500ms per log, and the tracer takes about 1500ms to end the subsegment - so there may be an opportunity to reduce the 4s cold start even further if we can figure out why :)

Fixes #572

…d optimise java interceptors

Java handlers now have snapstart enabled by default to improve cold start times. Ensure logger,
metrics and tracer perform as much initialisation as possible during the init phase which can
therefore be saved from snapstart invocations.

Fixes #572
@cogwirrel cogwirrel merged commit 3b73deb into mainline Oct 16, 2023
3 checks passed
@cogwirrel cogwirrel deleted the feat/java-snap branch October 16, 2023 01:24
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.

[FEATURE] (type-safe-api) Enable snapstart for java handlers by default
2 participants