• 
      

    Reduce the number of queries needed when loading extensions.

    Review Request #5558 — Created Feb. 27, 2014 and submitted — Latest diff uploaded

    Information

    Djblets
    master
    bf1a6a2...

    Reviewers

    Extension loading would, at the worst case, attempt a fetch + create for
    every extension. That create was only necessary the first time an
    extension was loaded, and the rest of the time we'd just be doing a
    fetch.

    Doing one fetch per extension is a waste of time. Instead, we want to
    fetch them all up-front, ideally.

    This new code keeps track of what we need to fetch and what we need to
    create. It then fetches all in one go, and then individually creates any
    remaining registere extension entries we may need.

    Played around with loading extensions, enabling, disabling, and doing
    full reloads. I also deleted some registrations and reloaded the list
    of extensions, and saw them populate again.

    Unit tests pass.