Can I get around extremely long time to setup WIFI connection WPA2 Personal? I'm using the Arduino Wifi Nina Library to connect an Arduino Uno Wifi Rev2 to wifi and then using the Arduino HTTP Client library to make HTTP post calls to the internet.

To connect the Arduino to my home Wifi Network (WPA2 Personal), I use the WiFi.begin() method. This method takes an excruciatingly long 4 seconds to connect to the Wifi. This seems to be a known issue. Since this methods is synchronous/blocking, my sketch is completely unresponsive during this time to any user input such as button-presses etc. I'm trying to create a proof-of-concept for a commercial-grade product. So having it go unresponsive to user-input for several seconds is unacceptable.

Is there any workaround to this? Is there a asynchronous library to achieve the same goal? Is there some other workaround? How do other people deal with this situation?
4 even 5 seconds is normal for connecting to WiFi. How long takes your phone or other devices to connect? 

You can connect a little faster with static IP address.

EDIT: With WiFiNINA library for Uno WiFi Rev.2, you can change the connection timeout with WiFi.setTimeout(). The default is 5 seconds. WiFi.begin() can end with WL_CONNECT_FAILED but if you later check the status of the connection it will eventually be connected. 



With esp8266 or esp32 you can make the connection persistent and it is build up immediately after boot and asynchronously. WiFiNINA library doesn't make this possible yet. Some future version will offer WiFi provisioning.