Skip to content

Slow startup due to an import-the-world approach #111

@apollo13

Description

@apollo13

Describe the issue
The app is great but it takes a while to start.

To Reproduce
Steps to reproduce the behavior:

  1. Start the app
  2. Wait a few seconds for it to actually show

Expected behavior
Startup fast and import stuff on demand

Operating system (please complete the following information):

  • Distro: Fedora
  • Version: 42
  • Desktop Environment: Gnome
  • Xorg/Wayland: Wayland

Additional context
I profiled the app startup a bit, by delaying some imports like daltonlens (on my machine in power save amount this already requires 200ms) in the colorblind simulator it should be possible to shave off a few seconds startup time.

Importing the WebView from Webkit has similar problems, but there it is used at module definition time

_webview = WebKit.WebView()

making it harder to fix. Begs the question though: Is it even correct to initialize a widget as part of the class and not in __init__. This would mean the instance is shared between all class instantiations (I don't know enough about how the gnome bindings work to say whether this is expected or not).

Would you be open to such fixes?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions