Optimize update_layout() to indicate the range of rows that were modified so that subsequent redraw requests can only affect those.