enthought/chaco — pull request #233 by pberkes (2014-11-05 11:30:50+00:00)
Title: Use `set_bounds` rather than setting `low` and `high` individually for Zoom.

This reduces the number of event fired around drastically.

Compare this profile snapshot before the change:
![screen shot 2014-11-05 at 11 23 20](https://cloud.githubusercontent.com/assets/314633/4916954/d016e9ec-64de-11e4-8510-d9abc6a67f4b.png)

and after:
![screen shot 2014-11-05 at 11 23 30](https://cloud.githubusercontent.com/assets/314633/4916955/d7c33ca4-64de-11e4-8c78-4a491df9596b.png)

Notice that the time per-call of `_do_zoom` is reduced from `0.00209` to `0.00122`, but especially that `_set_low_setting` and `_set_high_setting` are called once per `zoom_in` / `zoom_out`, reducing the potential for trouble if anything depends on the bounds of the plot.