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.
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:
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:
Output:
TODO: Remove
SRV_SLOTasap, as suggested by the comment.