This has been an issue for me for YEARS. It does not matter the version of Photoshop, the computer hardware or OS, the amount of RAM, processor, etc. I have used Photoshop on multiple systems with up to 32GB of RAM, speedy processors, fast GPU, etc., and it doesn't matter. Saving as "smallest file size" has always meant "longest wait in history". It's not isolated and there are no constants in any of it other than Photoshop. I can export from Illustrator in seconds, pull the file into Photoshop to reduce or manipulate it in some way, and then wait for the same file to save as a smaller version for 20 minutes. Even if I make no changes and do a "save as", the same thing happens. I create building graphics at 10% scale and have to be able to send proofs that are both readable and small enough for the client to download. I sometimes need to reduce those further for other uses but Photoshop PNG wait times kill me every time.