first launch after fresh installation of bec-widgets takes long time and leads to RPC timeout
Bug Report
Summary
After a fresh install of bec-widget
, the BECWidget popup window takes more than 5 seconds to launch, which exceeds the RPC response timeout. As a result, RPC communication fails to work. Restarting the BECIPythonClient
resolves this problem.
Expected Behavior vs Actual Behavior
The communication should not be interrupted by the RPC response timeout.
Steps to Reproduce
- Perform a fresh installation of
bec-widget
. - Launch
BECIPythonClient
in the terminal using thebec
command.
Proposed Solution
The longer initial wait time is probably due to the compilation of .pyc
files. To address this, we can precompile these files immediately after installation or increase the initial wait time for the RPC response after launching BECIPythonClient
.