Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize getting relative page URLs, now with less custom code #2407

Merged
merged 2 commits into from
Jul 7, 2021

Commits on May 16, 2021

  1. Optimize getting relative page URLs

    This is a custom implementation that's significantly faster but gives the exact same results as the current one. The use of `posixpath.relpath` pulled in several path-specific transformations that are never needed here.
    
    Efficiency is important because calls to `normalize_url` (e.g.) on a site with ~300 pages currently take up ~10% of the total run time due to the sheer number of them. The number of calls is at least the number of pages squared.
    oprypin committed May 16, 2021
    Configuration menu
    Copy the full SHA
    edaa5b9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3099539 View commit details
    Browse the repository at this point in the history