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

Prevent unnecessary re-rendering when only route context has changed #2563

Merged
merged 2 commits into from Apr 26, 2013

Commits on Apr 26, 2013

  1. Prevent unnecessary re-rendering when only route context has changed

    It should only be necessary to run `renderTemplate` when a route is
    entered. Subsequent changes to a route's context Just Work(tm) thanks
    to the usual magic of bindings.
    
    In addition to a theoretical performance benefit, this change gives
    the controller more control over precisely when and how the view will
    transition from model-to-model. (In my case, I'm using this capability
    to nicely animate the transition.)
    
    This change doesn't break any unit tests or change the API. But if
    someone is doing something weird in `renderTemplate` (like choosing
    their template based on the model, or doing something else with
    side-effects), they will get breakage. I think those cases are
    sufficiently pathological not to worry about.
    ef4 committed Apr 26, 2013
    Configuration menu
    Copy the full SHA
    dfcbacd View commit details
    Browse the repository at this point in the history
  2. Adding regression test

    ef4 committed Apr 26, 2013
    Configuration menu
    Copy the full SHA
    f67792e View commit details
    Browse the repository at this point in the history