Using SDL Semaphore for syncing makes program sluggish

Issue #343 wontfix
Former user created an issue

Original issue 343 created by matthew.brennan.jones on 2013-06-11T18:02:28.000Z:

If you run the program under Windows or Linux it is very sluggish. Even though it runs using very little CPU and at full speed, the UI gets jerky. Even on the Intel i7 and Intel Core Duo I tested it with.

This is because it is using a SDL Semaphore for throttling the speed the emulator runs at. All that signalling and context switching slows things down.

If you switch to just measuring the emulation loop time then sleeping, it solves these problems.

Attached is a patch that does this using gettimeofday() and usleep().

Comments (1)

  1. Former user Account Deleted

    Comment # 1 originally posted by ekeeke31 on 2013-06-11T18:22:43.000Z:

    Thanks but, as I stated before, the SDL port is not meant for general use (i only use it for core debugging and quick testing), is neither optimized for anything or even maintained (beside updating it in regard to genplus-gx core to allow it to compile)

    So yes it's a jerky port (I personally think it has much more serious issue than sluggy UI, at least I don't notice this with my old Core 2 Duo) but I don't know why people keep insisting on using it ^^

  2. Log in to comment