[major] Make the Pagelet.optimize async