In-App Purchase very slow. How to optimize speed ?

In the sandbox environment, when purchasing goods, I found that the payment pop-up window was very slow every time. It takes about 9 seconds. Is Apple’s server responding slowly? How to optimize speed?

This is my code snippet.

let payment: SKMutablePayment = SKMutablePayment(product: product)
SKPaymentQueue.default().add(payment)

I also find that the sandbox IAP server is very slow, but I've never had complaints from users so I presume that the production servers are much faster.

In-App Purchase very slow. How to optimize speed ?
 
 
Q