From 16e57e583835f477ca99439b62c58bfd5ce052f3 Mon Sep 17 00:00:00 2001 From: kdmukai Date: Thu, 23 Oct 2025 14:14:10 -0500 Subject: [PATCH] Import numpy, pivideostream in background --- src/seedsigner/controller.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/seedsigner/controller.py b/src/seedsigner/controller.py index 51417239..01070819 100644 --- a/src/seedsigner/controller.py +++ b/src/seedsigner/controller.py @@ -60,7 +60,7 @@ class BackgroundImportThread(BaseThread): def time_import(module_name): last = time.time() import_module(module_name) - # print(time.time() - last, module_name) + logger.debug(f"{time.time() - last:0.4f}: {module_name}") time_import('embit') time_import('seedsigner.helpers.embit_utils') @@ -70,6 +70,9 @@ class BackgroundImportThread(BaseThread): from seedsigner.models.seed_storage import SeedStorage Controller.get_instance()._storage = SeedStorage() + time_import('numpy') # used by PiVideoStream; by far the slowest import (2.29s) + time_import('seedsigner.hardware.pivideostream') + # Get MainMenuView ready to respond quickly time_import('seedsigner.views.scan_views')