Updating the sub-data (the open main page for the um STASH plugin, for example) at the end is much faster than doing it for each individual section.