AI OnAI Off
If you have a look at a PageReference from a page served from a Pageprovider you'll see that the name of the provider is included.
If you disable the url rewriter urls would look something like /Templates/Page.aspx?id=12345__pageprovidername&epslanguage=sv, also called mapped url.
So I guess the look-up isn't that slow and the rewriter also cache all rewritten urls.
... And that's why you shouldn't pass the ID from a PageReference to e.g. a querystring parameter;
<a href="MyPage.aspx?loadPage=<%= CurrentPage.PageLink.ID %>">Test</a>
And then parse it as an integer in MyPage.aspx. You should do:
<a href="MyPage.aspx?loadPage=<%= CurrentPage.PageLink.ToString() %>">Test</a>
And parse the PageReference with PageReference.Parse(Request["loadPage"]). Otherwise the provider name will be lost.
Hello!
Is there a performance loss when using a lot of pageproviders for one site?
I guess that the answer is hidden in how pages are mapped to provider so..... When a request arrives to the site how is current request url mapped to correct provider, is there a pageprovider manager that iterates over all providers and "asks are you owner for this page" or how does it work?
Thanks for clarifying this for me!