Page.window_destroy very slow
See original GitHub issueimport flet
def main(page: flet.Page):
def quit_window(e):
page.window_destroy()
page.add(flet.TextButton(text='quit', on_click=quit_window))
flet.app(target=main)
It takes ~5 second to destory the window, frozen during that period. Is that possible to speed up that process?
Issue Analytics
- State:
- Created a year ago
- Comments:13 (7 by maintainers)
Top Results From Across the Web
web page takes a long time to close when pressing close button
What is causing the long pause between when I press the close button (upper right), and the page actually closing?
Read more >Web Pages Loading Slowly? 11 Fixes to Try in Windows 10
1. Check for Malware, Spyware and Viruses ... This step is pretty much a given. If something is loading slowly on a computer,...
Read more >very slow closing of windows - Allround Automations forums
This behavior does not start immediately - if I open a window and close it inside of say 5, 10 minutes then it...
Read more >web pages slow to close - Bleeping Computer
Hi when i click the red cross top right of web page it takes about 10 seconds to close . Im on windows...
Read more >PC running slow? Here's how to speed things up - CNET
You don't need to throw the whole computer away. We'll walk you through some easy ways to get your PC back in shape....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes and it works. My initial concern is it may slow down things in a loop. Then I realized I shouldn’t be coding that way, since only a single window is supported and I shouldn’t create and destroy it many times.
No,
sys.exit()
doesn’t quit the script at all.Also, the window may need to be reopened, by let’s say a system tray icon. Now I’m using
page.window_visible
to hide the window instead of destroying it as a more proper way, but it hurts the exiting speed nevertheless.So maybe you can add hiding to the beginning of
page.window_destroy()
, and let it quit quietly?