Speed up the clearing of URL caches in DynamicURLResolver.

Review Request #7808 — Created Dec. 15, 2015 and submitted

Information

Djblets
release-0.8.x

Reviewers

When modifying the list of URLs in a DynamicURLResolver, it's necessary
to walk the chain of parent resolvers and re-populate them. This is
because each spot in the chain maintains caches for lookups further in
the chain.

The way we were doing this was slow. We forced a repopulation of every
level between the root and the DynamicURLResolver. This was slow, and
unnecessary. We're now clearing all private cache state instead, forcing
these to repopulate on demand later and not up-front. That helps greatly
when adding/removing multiple URLs at once, and prevents a lot of
unnecessary premature work.

Djblets, Review Board, and Power Pack unit tests pass.

reviewbot
  1. Tool: Pyflakes
    Processed Files:
        djblets/urls/resolvers.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        djblets/urls/resolvers.py
    
    
  2. 
      
david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-0.8.x (61d5a64)