cylc/cylc — pull request #722 by benfitzpatrick (2013-10-16 10:47:34+00:00)
Title: cylc gui: more efficient update communication

This change means that `cylc gui` only receives data from the daemon when the data has changed. This reduces the network overhead in having one or more GUIs open for a relatively slowly changing remote suite.

At the moment, the updater thread in `cylc gui` asks the suite daemon for the full summary data structures every second (less often on shutdown). This isn't necessary during periods when there are no changes - most suites do not change every second and the data sent is often redundant. The GUI should only get the data from the daemon when there have been changes and the old data is out of date.

The suite daemon now stores a floating point timestamp for the last summary update. Every second, the updater thread asks for the timestamp and compares it to the last one it received. If they are different (there has been an update), then it asks for the full summary data structures.

The `compare_dict_of_dict` function is no longer used in `updater.py`, so I moved it to `xstateview.py` which still uses it.

The diff below is a little bit confusing - the `?w=1` URL option helps.

@hjoliver, please review.