Closed ren2r closed 5 years ago
The main reason we kept the GTK path was because it's so much faster than the KDE path. I'll need to compare the recursive KDE path speed vs GTK before making a final decision.
I can merge it into performance
, but I will be manually breaking this patch into 4-5 smaller commits for the master
branch. You've got a lot of good stuff in this patch.
menuKeys
, leaving them in insertion order (which is a good idea).get_layout
function is a good idea. dbusmenu_object_iface.GetLayout()
returns [revision, layout]
btw, which is why we have the magic [1]
index.if ___ not in ___:
since there is an else
statement block as well. It's always better to use if true: else:
rather than if false: else:
.dbus.UInt32(time.time())
in the Firefox "opened" event, was it not necessary?TODO: Force push to ammend the commits in the performance-pr16
branch to give you credits before a final merge to master
.
See the comparison: https://github.com/Zren/plasma-hud/compare/master...performance-pr16
In plasma-desktop the gtk menus are already exported to
gmenu_dbusmenu_proxy
, and use the same methods as qt applications and we can unify the code. Some apps like kwrite has deep menu items that only appears if we call About ToShow at least once for each submenu (e.g. highlighting, mode ) ... this way the method expanse_all_menu_with_dbus was not working since it would need a loop to expand all the submenus.