From bfab36ece49767c13c051e281a20e92eb9d106e9 Mon Sep 17 00:00:00 2001 From: Axel Svensson Date: Sat, 13 Jul 2024 17:03:19 +0000 Subject: [PATCH] debug print photo load time --- pdf-sign | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pdf-sign b/pdf-sign index eace88b..2d6873f 100755 --- a/pdf-sign +++ b/pdf-sign @@ -283,7 +283,10 @@ def main(args): if not updateActive: return (w, h) = displaySize() - root._docImg = tk.PhotoImage(file=str(displayPNG())) + filename = str(displayPNG()) + before = time.time() + root._docImg = tk.PhotoImage(file=filename) + print(f"Debug: Loading photo image took {time.time()-before:.2f} seconds", flush=True) root._docView.itemconfig(root._docViewIndex, image=root._docImg) root._docView.configure(width=w, height=h) updateTitle()