You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
( But this give me a lot warning : [2021-06-22 23:58:50.837] [warning] Failed to set tray item property: Fcitx.WindowId, value = 0, err = std::bad_cast )
The text was updated successfully, but these errors were encountered:
Hm... With all the quirks of various SNI client implementations that was the most compatible way of writing this, so I'd like to preserve the current logic.
Following patch should solve the pretty-printing:
Another option is to infer changed properties from signals and update those unconditionally. I have a rough draft at alebastr@7fd1566, but it has way too much string comparisons to my taste.
I did not get to profile any of those though. Would appreciate if you can try and compare both.
Waybar/src/modules/sni/item.cpp
Lines 169 to 176 in d08fbb2
This is caused by
value.equal(old_value)
.Maybe an upstream issue, the implement ofg_variant_equal
is compare them by their pretty-printing string, which use many CPU cycles.(This is the source code: https://gitlab.gnome.org/GNOME/glib/-/blob/main/glib/gvariant.c#L2736)I remove this compare and the CPU usage reduce nearly to zero:
( But this give me a lot warning :
[2021-06-22 23:58:50.837] [warning] Failed to set tray item property: Fcitx.WindowId, value = 0, err = std::bad_cast
)The text was updated successfully, but these errors were encountered: