From code comments:
// Fast path link generation where we recognize an OData path of the form "prefix/{*odataPath}".
// Link generation using HttpRoute.GetVirtualPath can consume up to 30% of processor time
// This is incredibly brittle code and should be removed whenever OData is upgraded to the next version
// The right long-term fix is to remove this code and introduce an ODataRoute class that computes GetVirtualPath much faster
// But the long-term fix cannot be implemented because of a critical bug in WebAPI routing that affects custom routes in WebHost
// Fast path link generation where we recognize an OData path of the form "prefix/{*odataPath}".
// Link generation using HttpRoute.GetVirtualPath can consume up to 30% of processor time
// This is incredibly brittle code and should be removed whenever OData is upgraded to the next version
// The right long-term fix is to remove this code and introduce an ODataRoute class that computes GetVirtualPath much faster
// But the long-term fix cannot be implemented because of a critical bug in WebAPI routing that affects custom routes in WebHost