If you have ever worked with manipulating the PageSetup member in Excel, you'll be familiar with the performance hit you may receive while making modifications to it. In Office 2010, a property was added that can optimize this behavior: Application.PrintCommunication.

By setting PrintCommunication to false, you can pause committing PageSetup changes, such that they are not immediately written to the workbook (but still stored in a cache). In order to commit all PageSetup changes at once, you simply set the PrintCommunication member back to true. See an implementation of this in the following proof of concept:

 Worksheet activeSheet = Application.ActiveSheet;
if (activeSheet != null) {
Application.PrintCommunication = false;

PageSetup pageSetup = activeSheet.PageSetup;
activeSheet.PageSetup.DifferentFirstPageHeaderFooter = false;
activeSheet.PageSetup.CenterHeader = "Contoso Ltd.";

Application.PrintCommunication = true;

For additional reading, see the MSDN article on PrintCommunication.