1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Fixed XenForo_Link doesn't cache includeTitleInUrls & routeFiltersOut

Discussion in 'Resolved Bug Reports' started by Xon, Jan 6, 2015.

  1. Xon

    Xon Well-Known Member

    In the XenForo_Link::buildPublicLink and in the XenForo_Link::buildIntegerAndTitleUrlComponent code path; includeTitleInUrls & routeFiltersOut are both fetched directly out of the Zend Registry without an class-local caching.

    Commonly hit options such as_useFriendlyUrls & _romanizeTitles & _indexRoute use a class static variable, and this has a minor performance improvement over calling XenForo_Application::Get() in what is effectively a tight loop.

    While the overhead is not that great, buildPublicLink is called a lot. And the saving will obviously depend on the page.
  2. Mike

    Mike XenForo Developer Staff Member

    I have changed this, though on a normal page I doubt you're going to see a difference. If you generate 10,000 links on a page you may see a very small difference.
    Xon likes this.

Share This Page