On a more general note, I would recommend not using parsers like BeautifulSoup when building plugins, because they parse the entirety of the content you feed them and construct a tree representation for simple querying. The worst case is that multiple plugins parse the same HTMl over and over again.
In Material for MkDocs, we're always trying to make parsing as efficient as possible:
- Find relevant segments in the HTML with regular expressions
- Extract those segments and parse them as fragments by using a streaming parser
See our [readtime computation](https://github.com/squidfunk/mkdocs-material/blob/master/src/plugins/blog/readtime/__init__.py) implementation with its [parser](https://github.com/squidfunk/mkdocs-material/blob/master/src/plugins/blog/readtime/parser.py) for reference.
_Originally posted by @squidfunk in https://github.com/ojacques/mkdocs-git-committers-plugin-2/issues/32#issuecomment-1700948859_
From @squidfunk: