Skip to content

Server launch daemon event fires every cycle #849

Description

@dirkwhoffmann

While working on the new Qt-based home for the emulator, I discovered a severe performance issue related to the server launch daemon. Let's have a look at the code in the vAmiga code base, where the same problem exists:

void
RemoteManager::serviceServerEvent()
{
    // The server event slot is no longer used, as the launch daemon is
    // now run in update(). It is safe to remove the SRV_SLOT.
}

The problem is that the function no longer clears the event slot. As a result, the scheduler continues to trigger the event on every cycle, even though the handler itself no longer performs any work.

Adding a temporary debug statement confirms this behavior:

logdebug(STDERR, "serviceServerEvent\n");

Output:

...
[31] (181,132) F800E4 00 ------ 0000 0020 serviceServerEvent
[31] (181,133) F800E4 00 ------ 0000 0020 serviceServerEvent
[31] (181,134) F800E4 00 ------ 0000 0020 serviceServerEvent
[31] (181,135) F800E8 00 ------ 0000 0020 serviceServerEvent
[31] (181,136) F800E8 00 ------ 0000 0020 serviceServerEvent
...

TODO: Remove SRV_SLOT asap, as suggested by the comment.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions