-
Notifications
You must be signed in to change notification settings - Fork 428
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
perf(serverless): lazy import botocore code #12830
Conversation
|
Bootstrap import analysisComparison of import times between this PR and main. SummaryThe average import time in this PR is: 226 ± 2 ms. The average import time in main is: 237 ± 2 ms. The import time difference between this PR and main is: -10.74 ± 0.07 ms. Import time breakdownThe following import paths have disappeared:
|
BenchmarksBenchmark execution time: 2025-03-24 21:37:52 Comparing candidate commit 5a900df in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 478 metrics, 2 unstable metrics. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't love adding the imports into the event handlers, since if they are called at a high rate, then might have a perf impact. I don't think we have benchmarks to validate this though.
Given the other comments about potentially refactoring this to d patch on import/remove integration specific handlers from always being loaded, I think that would alleviate any initial feelings I have over perf.
That all being said, think we can handle things as follow-ups.
This PR lazy loads a couple of packages so they are only imported when needed.
Checklist
Reviewer Checklist