Skip to content

Unload UI when it's not in use, to reduce the performance impact even further #328

@Tyrrrz

Description

@Tyrrrz

As a result of the discussion that took place in #273, it became apparent that the biggest culprit in LightBulb's passive CPU/RAM consumption is the GUI rendering loop, which is active even when the application is hidden to tray. To deal with that, we can try to detach the UI from the core gamma manipulation loop and only load the UI (and the associated resources) when needed.

Ideally, we should try to achieve this within a single process. Would need to investigate if Avalonia supports shutting down the application without exiting the process. If so, we may be able to shut down and re-start multiple application lifetimes within a single process lifetime, which should do the trick.

Worst case scenario, we would have to split the application into two separate processes (headless backend and on-demand frontend) and figure out a way to make them communicate with each other. This is possible, but significantly more difficult.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions