api: conditionally load entrypoints for OTEL_PYTHON_CONTEXT#5144
api: conditionally load entrypoints for OTEL_PYTHON_CONTEXT#5144codeboten wants to merge 14 commits into
Conversation
This prevents unnecessarily importing the entry points library, reducing the memory footprint of loading the API by about a MB (27%): |Scenario | Memory before | Memory after | delta | | - | - | - | - | |Import API only | 5.43 MB | 4.49 MB | -940 KB | |API + get_tracer (no-op) | 5.05 MB | 4.10 MB | -950 KB | Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
MikeGoldsmith
left a comment
There was a problem hiding this comment.
Looks good, thanks @codeboten. Please add a changelog entry 👍🏻
Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
|
added changelog, ptal |
Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
codeboten
left a comment
There was a problem hiding this comment.
dont think the check-links failure is related to this change
MikeGoldsmith
left a comment
There was a problem hiding this comment.
Nice, thanks @codeboten 🚀
|
@open-telemetry/python-maintainers is there anything else needed on this pr to move it forward? |
@codeboten There are a large number of PRs in the backlog, so unfortunately it's just a bit of a waiting game. |
|
thanks @herin049, just making sure there isn't something i should be doing here :) |
|
Thanks for the PR! Just a heads-up: we no longer update Please add the appropriate changelog fragment for this change instead of editing |
Description
This prevents unnecessarily importing the entry points library, reducing the memory footprint of loading the API by about a MB (27%):
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Does This PR Require a Contrib Repo Change?
Checklist: