Sweets / tiramisu

Desktop notifications, the UNIX way
MIT License
739 stars 19 forks source link

Does tiramisu (or dbus?) give backpressure on notification sending? #60

Closed bo0tzz closed 2 months ago

bo0tzz commented 2 months ago

I appreciate that this very well might not be a tiramisu issue, but it's the best lead I have :)

I'm using polytiramisu to display notifications in my polybar. Here's the script I use https://github.com/bo0tzz/i3-config/blob/master/scripts/polytiramisu.sh. The behaviour (I think) I'm seeing is that when Discord sends multiple notifications at once, it seems to block Discord's main thread and freeze it up until all of the notifications have been displayed on my bar. Is it possible that it's getting blocked by tiramisu somehow, is dbus not as async as I thought, or is this just bad design on discord's end?

Tiramisu is lovely btw, thank you very much!

Sweets commented 2 months ago

Tiramisu does not do any sort of blocking on the org.freedesktop.Notifications bus, which is just a fancy way of saying tiramisu doesn't do anything. A handler is attached, and that handler only outputs the notifications, nothing more than that.

Likewise, this also means there's nothing an end user could do to cause blocking with tiramisu, either. The notification will emit. The receiver could delay notifications, or wait for a bunch of notifications to come through or what have you, but polytiramisu does no such thing. So to me, this sounds purely like bad design from Discord, or potentially Chromium or Electron. Plus, notifications wouldn't cause any blocking on the main thread.

bo0tzz commented 2 months ago

That's what I thought, thank you for clarifying!