Your comments made me to think of two possible resolutions.
1. Fetch wpad.dat in background and then retry any request in
"not-yet-connected" state, so if any file is already able to load without proxy,
let it finish, but all new and "not-yet-connected" to (re)load via proxy.
2. When starting Fx with fresh profile (and Import Wizard didn't import anything
about proxy settings), let the browser fetch wpad.dat file, if it successes -
set it as permanent, if it fails - set to direct.
Your comments made me to think of two possible resolutions.
1. Fetch wpad.dat in background and then retry any request in
"not-yet-connected" state, so if any file is already able to load without proxy,
let it finish, but all new and "not-yet-connected" to (re)load via proxy.
2. When starting Fx with fresh profile (and Import Wizard didn't import anything
about proxy settings), let the browser fetch wpad.dat file, if it successes -
set it as permanent, if it fails - set to direct.