xdg-desktop-portal-gnome (xdpg) is using a lot of processor time.
Ubuntu 22.10, GNOME 43, xdpg 43
I was looking at htop and saw that xdpg was using a lot of processor time so I logged it and charted it. If you look at what I've charted here https://imgur.com/a/evHLndZ it's using a lot of processor time. Some of the spikes are well over 500% CPU utilization. (You'll need to open the images in a new tab in order to actually see some of the data.)
In order to condense the x-axis, all values of 0 were removed.
The individual charts are labeled with enough information that I think they're understandable, but after dropping the 0 values to condense the X-axis, I modified the Y-axis to have a maximum of 200% (chart 2), then I strippped out all the values under 200% (chart 3), then modified the Y-axis to have a minimum of 200% utilization (chart 4).
The data was generated with this: https://pastebin.com/bDNekZHh found at https://stackoverflow.com/questions/1221555/retrieve-cpu-usage-and-memory-usage-of-a-single-process-on-linux. I believe that the data is collected every tenth second, but in all honesty I just cargoed the whole code and just collected the data output.
If I use the accept answer from the above stackflow link:
ps -p <pid> -o %cpu,%mem,cmd results in
%CPU %MEM CMD
49.2 1.5 /usr/libexec/xdg-desktop-portal-gnome
I understand that is an average over the time the process has been running, and if my understanding is correct then that's eating half of my processor time.
So assuming the collected data accurately reflects that xdpg is using a lot of processor time what does it do, why is it doing it, and is there any way to reduce the CPU utilization? I'm going to take a wild guess that the why probably has something to do with Chrome 110, but I don't really understand why it would be using the xdp-gnome as opposed to e.g., xdp-gtk since it isn't actually a GNOME application.