Hi,
At the beginning, I wanted to see how (which and when) plug-ins events are triggered, and finally I wrote a profiler plug-in! I will publish it soon.
I test an optimization of the memory consumption. As you can see one the graph (Traefik documentation build: blue vs orange plot), the modification is efficient even it is very minor (2 lines of code).

FC-Mkdocs-Malloc-Profiling.pdf
⚠️ The unit of memory consumption is in MB not in KB 🙄
If you agree, I will create a pull request.
Thanks for MkDocs