diff --git a/core/.changelog.d/3633.changed b/core/.changelog.d/3633.changed new file mode 100644 index 000000000..dcc32f9a2 --- /dev/null +++ b/core/.changelog.d/3633.changed @@ -0,0 +1 @@ +Improved device responsiveness by removing unnecessary screen refreshes. diff --git a/core/src/trezor/loop.py b/core/src/trezor/loop.py index 856bc7c97..833be21be 100644 --- a/core/src/trezor/loop.py +++ b/core/src/trezor/loop.py @@ -20,9 +20,6 @@ if TYPE_CHECKING: AwaitableTask = Task | Awaitable Finalizer = Callable[[Task, Any], None] -# function to call after every task step -after_step_hook: Callable[[], None] | None = None - # tasks scheduled for execution in the future _queue = utimeq.utimeq(64) @@ -179,8 +176,6 @@ def _step(task: Task, value: Any) -> None: else: if __debug__: log.error(__name__, "unknown syscall: %s", result) - if after_step_hook: - after_step_hook() class Syscall: diff --git a/core/src/trezor/ui/__init__.py b/core/src/trezor/ui/__init__.py index fb017b323..fd67a4def 100644 --- a/core/src/trezor/ui/__init__.py +++ b/core/src/trezor/ui/__init__.py @@ -60,11 +60,6 @@ else: refresh = display.refresh -# in both debug and production, emulator needs to draw the screen explicitly -if utils.EMULATOR or utils.INTERNAL_MODEL == "T2B1" or utils.INTERNAL_MODEL == "T3B1": - loop.after_step_hook = refresh - - async def _alert(count: int) -> None: short_sleep = loop.sleep(20) long_sleep = loop.sleep(80)