Forum Discussion
Python 3.11 notebook slow startup when using builtin import
Hi P_work,
Thank you for reaching out to the Microsoft fabric community forum.
When a notebook is triggered from a pipeline, it always starts with a fresh session. During startup, Python has to set up the environment and load all imported files. If the notebook is using built-in or shared .py imports, this step takes more time, so the notebook startup feels slow. When those imports are removed, startup becomes faster.
Currently, there is no option to keep the notebook warm or reuse the same session when running from pipelines. Cold start will happen every time.
As a workaround, try to keep only required imports at the top and move other imports inside functions. Also, keep shared utility files as small and simple as possible to reduce startup delay.
Once the notebook starts, execution speed should be normal. The delay is mainly during initialization.
Hope this clarifies the issue.
Regards,
Community Support Team.
Hi P_work,
I hope the information provided above assists you in resolving the issue. If you have any additional questions or concerns, please do not hesitate to contact us. We are here to support you and will be happy to help with any further assistance you may need.
Regards,
Community Support Team.