Cache get_extension_points output
lights0123 opened this issue · 0 comments
lights0123 commented
When using Python 3.8 on Ubuntu 20.04, calling colcon with --packages-select
ends up calling get_extension_points many times, which calls importlib.metadata.entry_points 60+ times, spending a total of 3+ seconds just get the exact same answer each time. This hurts productivity when doing incremental compilation, since I have optimized incremental compilation to less than 2 seconds. Slapping on a @functools.cache
should help this greatly.
(note: the left side of this graph is cut off because the profiler, viztracer, ran out of RAM)