In T285917, the formatting of comments in revision lists was batched in MediaWiki core, to reduce the amount of database queries. (Regular comments need to do database queries to check if [[links]] in comments are blue or red, if I understand correctly.) Wikibase likes to add labels to links to entities in comments (e.g. [[Property:P735]]: [[Q463035]] → given name (P735): Douglas (Q463035)), and it would be great to batch this work as well, getting all the labels (and descriptions) in one go.
Currently, getting 500 history lines from Q42 makes 2816 DatabaseMysqli::doQuery() calls. See also T292203 for a semi-related task where (due to a bug) we try to format so many links that the request times out.