-
Notifications
You must be signed in to change notification settings - Fork 412
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
chore(serverless): lazy load slow package imports #8994
Conversation
BenchmarksBenchmark execution time: 2024-04-24 09:20:48 Comparing candidate commit aa8ecaa in PR branch Found 49 performance improvements and 5 performance regressions! Performance is the same for 147 metrics, 9 unstable metrics. scenario:coreapiscenario-context_with_data_listeners
scenario:coreapiscenario-context_with_data_listeners_and_all_listeners
scenario:coreapiscenario-context_with_data_no_listeners
scenario:coreapiscenario-core_dispatch_listeners
scenario:coreapiscenario-core_dispatch_listeners_and_all_listeners
scenario:coreapiscenario-core_dispatch_no_listeners
scenario:coreapiscenario-core_dispatch_only_all_listeners
scenario:coreapiscenario-core_dispatch_with_results_listeners
scenario:coreapiscenario-core_dispatch_with_results_listeners_and_all_listeners
scenario:coreapiscenario-core_dispatch_with_results_no_listeners
scenario:coreapiscenario-core_dispatch_with_results_only_all_listeners
scenario:coreapiscenario-get_item_exists
scenario:coreapiscenario-get_item_missing
scenario:coreapiscenario-set_item
scenario:httppropagationextract-all_styles_all_headers
scenario:httppropagationextract-empty_headers
scenario:httppropagationextract-full_t_id_datadog_headers
scenario:httppropagationextract-invalid_priority_header
scenario:httppropagationextract-invalid_span_id_header
scenario:httppropagationextract-invalid_trace_id_header
scenario:httppropagationextract-large_valid_headers_all
scenario:httppropagationextract-medium_valid_headers_all
scenario:httppropagationextract-tracecontext_headers
scenario:httppropagationextract-valid_headers_all
scenario:httppropagationextract-valid_headers_basic
scenario:httppropagationextract-wsgi_valid_headers_all
scenario:httppropagationextract-wsgi_valid_headers_basic
scenario:httppropagationinject-ids_only
scenario:httppropagationinject-with_all
scenario:httppropagationinject-with_dd_origin
scenario:httppropagationinject-with_priority_and_origin
scenario:httppropagationinject-with_sampling_priority
scenario:httppropagationinject-with_tags
scenario:httppropagationinject-with_tags_invalid
scenario:otelspan-add-metrics
scenario:otelspan-add-tags
scenario:otelspan-start-finish
scenario:otelspan-start-finish-telemetry
scenario:samplingrules-average_match
scenario:samplingrules-high_match
scenario:samplingrules-very_low_match
scenario:sethttpmeta-all-disabled
scenario:sethttpmeta-all-enabled
scenario:sethttpmeta-collectipvariant_exists
scenario:sethttpmeta-no-useragentvariant
scenario:sethttpmeta-obfuscation-regular-case-explicit-query
scenario:sethttpmeta-obfuscation-worst-case-explicit-query
scenario:span-add-metrics
scenario:span-add-tags
scenario:span-start
scenario:span-start-finish-telemetry
scenario:span-start-finish-traceid128
scenario:span-start-traceid128
scenario:tracer-large
|
dab5373
to
b955867
Compare
Datadog ReportBranch report: ✅ 0 Failed, 122855 Passed, 50391 Skipped, 3h 39m 23.18s Total duration (6h 51m 24.2s time saved) |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8994 +/- ##
===========================================
- Coverage 78.61% 7.23% -71.38%
===========================================
Files 1254 1224 -30
Lines 117600 115821 -1779
===========================================
- Hits 92447 8376 -84071
- Misses 25153 107445 +82292 ☔ View full report in Codecov by Sentry. |
This import takes around 89ms and is unneeded when run in serverless.
011863a
to
1b70095
Compare
Lazy loads
logging.handlers
multiprocessing
email.mime.application
email.mime.multipart
All of which are slow to import and not needed when run in aws lambda. This improves cold start time.
Also, updates tests to ensure the code is not accidentally updated in the future to import these packages.
Checklist
changelog/no-changelog
is set@DataDog/apm-tees
.Reviewer Checklist