i'm not sure but i think that importlib does not cache entry points and reads them every time `entry_points` is called.
when i checked it, it took about 5-10 ms for each call to entry_points. since it probably depends on the number of packages installed these times are not representative but indicate that there is some overhead.
afaik pkg_resources (although much slower than importlib) caches everything when the module is first imported, so only the first import of the module takes some time.
since OTel uses quite a number of entry points maybe it would make sense to lazily load and cache them?
Originally posted by @mariojonke in #3047 (comment)
when i checked it, it took about 5-10 ms for each call to
entry_points. since it probably depends on the number of packages installed these times are not representative but indicate that there is some overhead.afaik
pkg_resources(although much slower than importlib) caches everything when the module is first imported, so only the first import of the module takes some time.since OTel uses quite a number of entry points maybe it would make sense to lazily load and cache them?
Originally posted by @mariojonke in #3047 (comment)