How to build route for entity without loading it? I'm making a tree view of vocabulary terms and I need to link each term to it's page(depends on which link template name is provided as argument to my function).

I'm loading the terms with taxonomy_get_tree and I could get fully loaded entities with it but if the vocabulary grows this will impact performance. So I'm thinking if there is a way to get the route data to build links for the terms without the need to load the whole taxonomy term entities?

I could hard-code the routes because I know them but that would mean that for every new vocabulary or term link template the code would have to be changed which is not much of a solution.

So is there a way to build the route for the provided link template with only term ID?
Even in Drupal 7 https://api.drupal.org/api/drupal/includes%21common.inc/function/entity_uri/7 you needed the full blown entity for the URI to it. There's nothing new here.