Visualizing main loop delays

Ross suggested adding a feature to show when your main loop has been blocked. I borrowed some code from libsocialweb to do this. The orange blocks are periods of time when the main loop was delayed for more than 10 milliseconds. Probably useful for people trying to have high frame-rate/smooth animations.

Comments (4)

  1. Ross wrote:

    Also useful for people writing single-threaded DBus services, where you don’t want to end up blocking in a handler.

    Tuesday, November 30, 2010 at 2:54 am #
  2. lariq wrote:

    Nice! Does this work for more than one mainloop in the application (secondary mainloop for background worker thread seperated from the GUI thread)?

    Tuesday, November 30, 2010 at 4:18 am #
  3. Perfkit is is starting to look like a really useful tool! Keep up the progress :)

    Tuesday, November 30, 2010 at 4:19 am #
  4. chergert wrote:

    @lariq

    Not at the moment as it injects itself via GTK_MODULES environment variable into the default GMainContext.

    Tuesday, November 30, 2010 at 8:56 am #