graphite-project/graphite-web — pull request #24 by derpston (2012-07-14 01:54:27+00:00)
Title: Fix for unnecessary rendering while loading a saved graph

When loading a saved graph, ```toggleTarget``` is called several times, once for each target being added or removed. This causes lots, potentially dozens, of unnecessary and expensive calls to ```/render```, all separated by a few milliseconds, and the user never sees any benefit. Instead, the user is kept waiting while all these unwanted charts are rendered.

This change adds an optional parameter to ```toggleTarget``` to turn off graph updating, a new wrapper function for ```toggleTarget``` called ```toggleTargetWithoutUpdate```, and graph loading uses it.