It looks like the promise created by doOptimizePage should be stored in the context