Skip to content

[PATCH] SimpleGraphic: use blocking Windows event loop #636

@sthalik

Description

@sthalik

Having found the source code for SimpleGraphic in #28, I'm working on reducing the software's CPU usage. Initially, asynchronous processing like passive tree download broke, but there's a simple realization as to when we need to refresh the tab. Background processing is done via "sub-scripts", and we need to perform refreshes if and only if a "sub-script" exists.

I implemented a working blocking event loop, as well as special-casing for the "sub-script" case. Given there's no repository for SimpleGraphic, I made a new repository: <https://github.com/sthalik/PathOfBuilding-SimpleGraphic>. You can compare the code to the public SimpleGraphic release. The most recent mingw-w64 commit isn't needed for Visual Studio at all though.

Whether this approach suits you or not, I urge you to implement event handling in some way. It's an idiom to register for and listen for events in the main loop. POB is anomalous here in how it performs lots of needless work while it's running.

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