Skip to content

pygobject asyncio

Marinus Schraal requested to merge wip/mschraal/pygobject-asyncio into master

Use the newfangled AsyncIO support in PyGObject.

Update august 9

Mostly done now, pretty happy how this is working and the performance.

  • Not all seems to be working. Especially on fresh runs (empty cache) a lot of lookups seem to dissapear, mostly on the artists side. This may be tasks being discarded or some logic not being done right. (mistake on my side)
  • On fresh runs the GStreamer discoverer does not rate limit, so it can hit the open file limit quite easily and error out. This needs a bit of a rewrite to get it under control in the current code. (tackled)
  • The code has been 'lazily' adapted to asyncio from our AsyncQueue solution (which eg. used a 'start' function), for cleanliness it could maybe use a further cleanup. There is no real need to do this right away as asyncio is in testing anyway.
  • There are some async leftovers that still need to be ported (gio dbus calls come to mind, maybe grilo calls as well, not sure if the latter will work with the pygobject asyncio).
  • There is a few ms non-interactive lockup on application start for me that seems to be related to all the changes, try to figure out where that comes from. (probably unrelated)
  • Error handling in asyncio seems to be incomplete(?), so we deal with specific errors with a string comparison. (pygobject#641 (closed)) (fixed)
Edited by Marinus Schraal

Merge request reports